3 ms·
No. CUDA allows you to write all the code in a single file, and uses a preprocessor to split it back out and pass it through separate compilers, one for host an
by jacobgorm 16d ago
No. CUDA allows you to write all the code in a single file, and uses a preprocessor to split it back out and pass it through separate compilers, one for host and one for device.
- compiler-guy 16d agoThis true, but you can write the two separately if you want. The disadvantages of writing them together are listed in the various parent posts. But some code authors really like the convenience of having the two in the same file.