o use the printf facility one needs to have a device of compute capability of
2.0 or higher.
Go to "Project properties"/"CUDA runtime API"/GPU and change "GPU
Architecture" to sm_20.
Include the code
#if defined (__CUDA_ARCH__) && (__CUDA_ARCH__
< 200)
#define
printf(f, ...) ((void)(f, __VA_ARGS__),0)
#endif
before the first call to printf in __device__ code and #include "stdio.h".
An example may be found the file "OTSProjects/ots/cuda/deviceOutput.hpp".
|