I'm porting some code from Matlab to run on an Nvidia GPU. I can't figure out a way to do the following:
B = max(A, 0)
where A and B are matrices. In words, I need to replace negative values in a matrix with zeros. I know how to write a kernel function to do with, but I'd like to stick with cuBLAS or magma calls if possible (to avoid adding nvcc to my build process).