I want to split up an existing kernel file. Therefore i have to pass on my textures somehow. I tried to implement a declaration of the texture into a .cuh file and do the bind array in the corresponding .cu file. After the split of the kernel file i have to pass on the textures somehow. Therefore i simply added a parameter to the kernel functions like
global void testKernel(texture<float, 2, cudaReadModeElementType> texTest, …)
when i try to compile my code i get this from make:
Segmentation fault (core dumped)
make: *** [file-path/filename.o] Error 255
whereas filename.o is the corresponding object file where an array should be bound to the texture…
In the kernel part itself i only have access operations of course (tex2D)…
Is there a solution to my problem or is it simply not possible to have a texture as a paremter and as a result be not able to use it in multiple kernels.