The CUDA 4.2 SDK example project simpleTexture compiles and runs correctly in vs2008 sp1, but when I attempt to add textures to an ongoing CUDA kernel project, some of the necessary functions to create and use the binding are not recognized:
1>c:/ProgramData/NVIDIA Corporation/NVIDIA GPU Computing SDK 4.2/C/src/rohan/Rohan-kernel.cu(67): error: identifier "channelDesc" is undefined
1>c:/ProgramData/NVIDIA Corporation/NVIDIA GPU Computing SDK 4.2/C/src/rohan/Rohan-kernel.cu(664): error: identifier "tex2d" is undefined
The texture declaration itself seems okay:
texture<cuDoubleComplex, cudaTextureType2D, cudaReadModeElementType> tex;
I have duplicated all of the #includes from simpleTexture, include paths look the same, and the ongoing project uses the supplied template project/solution files customized as directed.
Everything was working well before adding the texture bits, what gives?
Try to compile with the flag
-arch sm_20