I need a kernel that computes the id with minimal value from tuples (value, id).
How can I do that?
Only idea i have is combine the values:
32bit: 16bit = value, 16bit = id
and use the atomic_min function, first local, then global of course.
If value is equal lower id would win. 16bit precision would be enough for me.
Is there a better way?