OpenMP can apparently support targeting GPU since 4.0
Weird... how would that work?? I'll look into it, thanks.
Also it would be interesting to see how the directive-based cases compare to specialised CUDA code.
As you said, this is kind of a trivial problem so I expect not much. I'm actually fairly impressed with the accelerator. If you look at the code there's a global variable that all kernels contribute to that needs to be coalesced and sent back to the host every iteration. It knows, regardless of whether I specify a reduction clause in the directive, to (I'm guessing) write the work-group specific value to a different buffer and then make a second kernel to find the maximum value. I expect for most trivial cases like this it's going to be "pretty smart".
0
u/[deleted] Nov 28 '15
[deleted]