Texturing in low level runtime api

texture< > reference variables are implicit static and declared at file scope. Thus, they must be present only in the .cu file containing the kernel that reads from the texture.

Your high level C++ code can allocate the cudaArray, device memory or whatever you need to manage the texture. Pass this to any kernel that will use the texture and it can call cudaBindTexture (a cheap operation) to bind the texture to the texture reference.

Just an additional note: In my experience textures cannot be put into a namespace, unlike all other CUDA features.