texture type isn't defined?

OK so I’m trying to create a couple of texture references, along these lines:

texture<dim3, 2> posTex;

(That’s a global variable).

But when I go to compile, I get:
:5: error: expected constructor, destructor, or type conversion before ‘<’ token

I’ve got the cuda_runtime.h included and I’m even using other types such as dim3 and cudaArray, but for some reason the texture type isn’t available to me, has anyone run into this?

dim3 is not an allowed type (see manual 4.3.1.1) and you are missing the ReadMode

Peter

Yeah I moved it to float3 and nvcc was compiling it as host cost (without the CUDACC flag), so I fixed that and it works now. Interestingly enough the size and ReadMode attributes are optional.