Finding maximum element of array

Hi Al,

I am wondering if any one knows an efficient way to find maximum element of array using CUDA?


Yes, there’s an efficient method. It applies to many operators like addition and multiplication as well. The basic strategy is called reduction and it’s extensively discussed in the CUDA SDK examples.
Look at the “reduction” project… both the code but especially the excellent writeup.