3 ms·
Is there a preprocessor in the chain? Because add<<<1, 1>>>(N, x, y); isn't regular C++. Sorry if I missed something.
by ape4 10y ago
Is there a preprocessor in the chain? Because
add<<<1, 1>>>(N, x, y);
isn't regular C++. Sorry if I missed something.
- mciancia 10y agoYou are also not using regular c++ compiler ;)
- haldean 10y agoCUDA C++ is technically its own language, which is mostly implemented using a preprocessor; nvcc performs some translation and then passes generated C++ to your compiler of choice. The kernel launch syntax, along with a few implicit includes and macros for __device__ and __global__ are (afaik) the only things that really distinguish it from vanilla C++.
- verandaguy 10y agoThe triple angle bracket syntax is used to specify execution details when the device code's sent to the GPU -- the details are outlined under "Picking up the threads" in the OP.