I bind cudaArray with 3D texture, but it seems that the maximal 3D texture is 256x256x256. Has linear memory this limitation?


Programming guide 2.0 said:

For a texture reference bound to a three-dimensional CUDA array, the

maximum width is 2 to 11, the maximum height is 2 to 11, and the maximum depth is

2 to 11;

However I cannot allocate 3D texture larger than 256x256x256 on GeForce 8800 GT

Any one use 3D texture? Could you give me some advice or some examples?

The maximum size of a 3D texture is 2048 ^ 3, but it is limited by the available GPU memory.

What texture format are you using? 3D textures get big very quickly.

Have you looked at the simpleTexture3D sample in the SDK?


I test it and it’s 2048^3.

Texture cache means that all the threads in the block share this cache? If it does I have no need to use share memory. Right?

The other thins is

float sum = 0;

for(int i = 0; i < numOfVoxel; i++) //numOfVoxel is 512*512*300 = 78643200

	sum += h_volume[i]; //h_volume[i] = 1.0;

printf(“the sum is %8.2f”, sum);

If I define sum as float the output is 16777216. If I define sum as double the output is correct :78643200

It makes me confusing.