Hi there,
I am beginner to CUDA and I have a question about the compiling error:
“error: no instance of overloaded function “tex3D” matches the argument list” When
I am trying to reference data elements in a 3D texture:
texture<float4, 3, cudaReadModeNormalizedFloat> tex;
float u,v,w;
float4 P = tex3D(tex, u,v,w);
I wrote the above code by following the simpleTexture3D example in SDK:
texture<uchar, 3, cudaReadModeNormalizedFloat> tex;
float voxel = tex3D(tex, u, v, w);
Thanks a lot!
Hi there,
I am beginner to CUDA and I have a question about the compiling error:
“error: no instance of overloaded function “tex3D” matches the argument list” When
I am trying to reference data elements in a 3D texture:
texture<float4, 3, cudaReadModeNormalizedFloat> tex;
float u,v,w;
float4 P = tex3D(tex, u,v,w);
I wrote the above code by following the simpleTexture3D example in SDK:
texture<uchar, 3, cudaReadModeNormalizedFloat> tex;
float voxel = tex3D(tex, u, v, w);
Thanks a lot!
[snapback]419826[/snapback]
It looks correct, but why compiler complains? External Media
Is there anyone can help? External Image Thanks!
immo
August 4, 2008, 7:12am
4
My guess is that its just as the compiler says: there is no overloaded version of tex3D that returns a float4. You have the same problems when trying to adjust the type to just float or something else?
My guess is that its just as the compiler says: there is no overloaded version of tex3D that returns a float4. You have the same problems when trying to adjust the type to just float or something else?
[snapback]420420[/snapback]
Yes, float3 and float2 are not supported for example. But other types like float, char…are ok. In fact, I successfully skipped this problem by using “__ftexfetch”, which is defined in texND(). I don’t know if this is a bug of compiler. :mad:
Yes, float3 and float2 are not supported for example. But other types like float, char…are ok. In fact, I successfully skipped this problem by using “__ftexfetch”, which is defined in texND(). I don’t know if this is a bug of compiler. :mad:
[snapback]420549[/snapback]
I have used float4’s for 2D texture fetching and everything was fine. What does your channel descriptor look like?
The channel descriptor is like this:
cudaChannelFormatDesc channelDesc = cudaCreateChannelDesc();
I figured out the reason of compiler error: the cudaReadModeNormalizedFloat should be replaced by cudaReadModeElementType.