inducer / pyopencl

OpenCL integration for Python, plus shiny features
http://mathema.tician.de/software/pyopencl
Other
1.05k stars 241 forks source link

Make if_positive keep strides of then_ if known. #523

Closed nchristensen closed 2 years ago

nchristensen commented 2 years ago

The previous version of if_positive always returns a C-ordered array even if then_ is not C-ordered. This breaks artificial viscosity in Mirgecom when an array context uses a Fortran style data layout. This change makes the output have the same strides as then_ if the shape of then_ is known, otherwise it defaults to use the same layout as criterion.

nchristensen commented 2 years ago

Yes please! Thanks!

inducer commented 2 years ago

https://pypi.org/project/pyopencl/2021.2.10/

inducer commented 2 years ago

(It should wind its way to conda forge before too long.)