Index of Minimum element in integer array.

Hi All,

As the title says, I’m trying to find the Index of the minimum element in an integer array.

I know cublasIsamin provides this for float array, but I need it for an integer array, and because of the number of functions and kernels that this array is being passed to is high, I can not easily just convert it to a float array,

Is there another way? cuda, cublas, any other library…

Thanks very much.

write it yourself? Check out the scan kernel; you just need to do the upwards step, and use min(a, b) instead of addition. Check out people.maths.ox.ac.uk/~gilesm/hpc/NVIDIA/CUDA_Optimization_Harris.pdf for optimization tips.

I think both scan program and reduction program (NVIDIA SDK) is useful for your reference.
:)