inducer / pyopencl

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

Inherit input array types in cl.array #582

Closed alexfikl closed 2 years ago

alexfikl commented 2 years ago

Fixes maximum, minimum and some other functions to return the same type as the input arrays.

For context: there were a couple of places in arraycontext that were still returning cl.Array instead of TaggableCLArray.

inducer commented 2 years ago

Thanks! For a moment I was worried that dropping the tags would be worrisome, but that's actually desired behavior. Correct, @kaushikcfd?

kaushikcfd commented 2 years ago

I was worried that dropping the tags would be worrisome, but that's actually desired behavior.

Yep! Not propagating the tags for TaggableCLArray is the desired behavior.

inducer commented 2 years ago

Great, thanks! Then this is good to go.