Define for emu modes

Is there a define that nvcc sets when given the -deviceemu flag that we can use to switch on different code in emulation mode in a .cu file? Any other defines set that may be useful (architecture and so forth?
Thanks, Eric

nvcc -v -deviceemu

will tell you all the flags and defines used


Thanks Massimiliano, I now notice a reference in the guide (in but I went looking in the nvcc manual and did not see anything. When I run the suggested command I see -D__DEVICE_EMULATION__ -D__CUDACC__ - will there be a standard expression for architecture types as well? Not relevant at the moment as there is only one.

Don’t know about the flag for switching architectures, as you said, there is only one :)