CUDPP: Finding index of the max. in an array


Is it possible to get the index of the maximum of an array using CUDPP?

With Scan function provided by CUDPP library, it is possible to efficiently find the maximum of an array, but then… how to know it’s index?

I need to know which position in the array, the maximum occupies.

Any idea of how to do such a thing?

CUDPP doesn’t support general reductions yet (just prefix sum), you might want to look at Thrust:

Specifically, you’ll want to use thrust::max_element():…t/extrema.h#129

There’s also a tutorial to get started: