How to use the suface avaiables in PTX?

This`s the part descript of PTX docments:

The surface (.surf) state space is similar to global memory, but is 2D in nature.  It takes a 2D 

address (i and j components), and with respect to cache, spatial locality generally works well 

in a 2D neighborhood.  This allows tiled decompositions to perform quite well.

it seems that should use it like :

.surf .f32 surfVar;


mov.f32 $r0,surfVar[0][3];

and at the end of sections 5.3.1:

Note that texture and surface variables do not have an associated type and size.

but through up descript it seems should be used as:

.surf[7][4].u32 surfVar;

Which is right?


According to section 10.5.2 of PTX documentation, declarations and instructions using .surf space are not supported. So I guess you don’t really need the answer.

O?That`s very helpless :ermm: