Skip to content

Subview `norm()` implementation and min/max bugfixes

Ryan Curtin requested to merge rcurtin/bandicoot-code:subview-norm into unstable

This MR implements norm() for subviews using the super simple strategy of extracting the subview and then computing the norm. That's not exactly the best strategy in the world, but it'll work for now and it can be fixed later.

However during tested I exposed a bug: the auxiliary memory used for min/max reduces was being initialized to 0... but what if you want to take the min of the array [1, 2, 3, 4]? You would get back 0, since that's what the auxiliary memory (for some threads) was being initialized to. I fixed that issue with a number of kernels, and needed to add some auxiliary OpenCL and CUDA functions that can be used inside of kernels.

This needs to be merged after !42 (merged).

Merge request reports