cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

bubu
Adept II

Jumbo 1D texture

Is possible to create a, let's say, 1M image(1D)? I need this to use the texture cache.... but I need it in 1D and not in 2D because I deal with linearised data in one dimension.

 

CUDA can deal with 1D textures up to 2^27 elements.

 

I could just use a global memory buffer, but

1. I don't like the 128Mb limit

2. I need a cache.

 

thx

0 Likes
2 Replies
nou
Exemplar

i think no.

but you can create normal 2D texture 8192*8192 and address is like this.

x = n >> 13;
y = n & 0x1fff;

i think in CUDA it work the same.

0 Likes

Originally posted by: nou i think no.

 

but you can create normal 2D texture 8192*8192 and address is like this.

 

x = n >> 13; y = n & 0x1fff;

 

i think in CUDA it work the same.

 

Nice trick, thx. You swapped x and y tho

0 Likes