Hello all,
I have started learning to use CUDA with the CUDA by example book. I have it all set up and working with MSVC 2008 c++ and compiles .cu files perfectly…
The book keeps mentioning that you can develop in C++ and in the SDK examples from the nvidia site, I can see .cpp files with cuda code in them, such as the line:
’ cudaResult = cudaMalloc((void **)&m_d_samples, m_nSamplesBatchTarget * sizeof(float)); ’
in the rng.cpp file in the ‘randomFog’ example.
Unfortunately if I set my .cu file to .cpp and make sure the custom nvidia build rule is still being used, i still get errors like:
’ error C3861: ‘cudaMalloc’: identifier not found ’
which shows that its not really working.
Any tips on any other steps i need to perform? I can never get the sdk examples to open correctly to experiment with them.
Thanks in advance,
Stuart