dieser Code nicht in CUDA Toolkit 7.5 auf einem gtx 980 mit Rechenkapazität auf 5,2 in Visual Studio 2013.cudaTextureObject_t texFetch1D nicht kompiliert
__global__ void a_kernel(cudaTextureObject_t texObj)
{
int thread_id = blockIdx.x * blockDim.x + threadIdx.x;
int something = tex1Dfetch(texObj, thread_id);
}
hier ist der Fehler eingestellt ist kompilieren.
error : more than one instance of overloaded function "tex1Dfetch" matches the argument list:
Dieser Code wird auch nicht kompiliert.
__global__ void another_kernel(cudaTextureObject_t texObj)
{
int thread_id = blockIdx.x * blockDim.x + threadIdx.x;
float something = tex1Dfetch<float>(texObj, thread_id);
}
hier ist dieser Fehler.
error : type name is not allowed
nach diesem Beispiel und die Kommentare, sollten alle oben arbeiten: https://devblogs.nvidia.com/parallelforall/cuda-pro-tip-kepler-texture-objects-improve-performance-and-flexibility/
lass es mich wissen, wenn Sie weitere Informationen benötigen, könnte ich denke nicht, was sonst noch zur Verfügung stellen zu.
Sie müssen einen [MCVE] (http://stackoverflow.com/help/mcve) Code anzeigen, der Ihren Fehler reproduziert. Genau wie du verlinkst, mit dem Code, wie du den Kernel lanchst und wie du das Tex obj erstellst. – kangshiyin