I know I can do the parallel reduction to sum up the elements of an array in parallel.
But it is a little difficult for me to follow it. I saw that in cublas, there is this function called cublasDasum
that sums up the absolute values of the elements. It seems there should be a very similar function that sums up the elements, not the absolute values. Is there any way I can find the source code of cublasDasum
and see how this is done?
Adding up an array is such a basic operation. I can't believe that there is no such a function that does it ... .