Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CUDA compiler (nvcc) macro

Is there a #define compiler (nvcc) macro of CUDA which I can use? (Like _WIN32 for Windows and so on.)

I need this for header code that will be common between nvcc and VC++ compilers. I know I can go ahead and define my own and pass it as an argument to the nvcc compiler (-D), but it would be great if there is one already defined.

like image 267
Ashwin Nanjappa Avatar asked Feb 06 '09 03:02

Ashwin Nanjappa


1 Answers

__CUDACC__

I don't think it will be that trivial. Check the following thread

http://forums.nvidia.com/index.php?showtopic=32369&st=0&p=179913&#entry179913

like image 159
basszero Avatar answered Sep 30 '22 22:09

basszero