cuTexRefSetAddress2D ( CUtexref  hTexRef,
const CUDA_ARRAY_DESCRIPTOR desc,
CUdeviceptr  dptr,
unsigned int  Pitch 
)

Binds a linear address range to the texture reference hTexRef. Any previous address or CUDA array state associated with the texture reference is superseded by this function. Any memory previously bound to hTexRef is unbound.

When using a tex2D() function inside a kernel, we have to either call cuTexRefSetArray() to bind the corresponding texture reference to an array, or cuTexRefSetAddress2D() to bind the texture reference to linear memory.

Function calls to cuTexRefSetFormat() cannot follow calls to cuTexRefSetAddress2D() for the same texture reference.

Parameters:
hTexRef - Texture reference to bind
desc - Descriptor of CUDA array
dptr - Device pointer to bind
Pitch - Line pitch in bytes
Returns:
CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE
See also:
cuTexRefCreate, cuTexRefDestroy, cuTexRefSetAddress, cuTexRefSetAddressMode, cuTexRefSetArray, cuTexRefSetFilterMode, cuTexRefSetFlags, cuTexRefSetFormat, cuTexRefGetAddress, cuTexRefGetAddressMode, cuTexRefGetArray, cuTexRefGetFilterMode, cuTexRefGetFlags, cuTexRefGetFormat


Generated by Doxygen for NVIDIA CUDA Library  NVIDIA