Skip to content

Add direct min() and max() for vectors

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

As part of porting clMAGMA's eigendecomposition operations, I found that I needed to compute the maximum absolute value present in a matrix. While I was at it, I figured I could also add min() and max(), since they're basically identical.

I used the same reduction strategy as is used for accu(). It might be nice to refactor our CUDA/OpenCL reductions to be a bit more cleaner later.

I also ensured that if you write, e.g., max(abs(...)) that it uses the specific max_abs kernels and does not compute an intermediate vector with the abs() operation.

There might be a little bit of PR noise for changes in anticipation of eig_sym(), but no functionality changes... everything should be commented out.

Merge request reports