3 ms·
I think there's a small error in the first code sample -- where the comment says: Run kernel on 1M elements on the GPU ... The call to `add` isn't a call
by verandaguy 10y ago
I think there's a small error in the first code sample -- where the comment says:
Run kernel on 1M elements on the GPU
... The call to `add` isn't a call to a function that'd be thrown onto the GPU. The `add` function is very much CPU-only based on the definition in that code sample (at least, not at that point!)
- ChristianGeek 10y agoThe first sample is meant to use the CPU.
- verandaguy 10y agoYes. My point is that the comment treats `add` like it's GPU code.