11.01.2014 Views

NVIDIA CUDA

NVIDIA CUDA

NVIDIA CUDA

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

186 Module Documentation<br />

4.31.1 Detailed Description<br />

This section describes the texture reference management functions of the low-level <strong>CUDA</strong> driver application programming<br />

interface.<br />

4.31.2 Function Documentation<br />

4.31.2.1 cuTexRefCreate (CUtexref ∗ pTexRef)<br />

Creates a texture reference and returns its handle in ∗pTexRef. Once created, the application must call cuTexRefSetArray()<br />

or cuTexRefSetAddress() to associate the reference with allocated memory. Other texture reference functions<br />

are used to specify the format and interpretation (addressing, filtering, etc.) to be used when the memory is read<br />

through this texture reference. To associate the texture reference with a texture ordinal for a given function, the<br />

application should call cuParamSetTexRef().<br />

Parameters:<br />

pTexRef - Returned texture reference<br />

Returns:<br />

<strong>CUDA</strong>_SUCCESS, <strong>CUDA</strong>_ERROR_DEINITIALIZED, <strong>CUDA</strong>_ERROR_NOT_INITIALIZED, <strong>CUDA</strong>_-<br />

ERROR_INVALID_CONTEXT, <strong>CUDA</strong>_ERROR_INVALID_VALUE<br />

See also:<br />

cuTexRefDestroy, cuTexRefSetAddress, cuTexRefSetAddress2D, cuTexRefSetAddressMode, cuTexRefSetArray,<br />

cuTexRefSetFilterMode, cuTexRefSetFlags, cuTexRefSetFormat, cuTexRefGetAddress, cuTexRefGetAddressMode,<br />

cuTexRefGetArray, cuTexRefGetFilterMode, cuTexRefGetFlags, cuTexRefGetFormat<br />

4.31.2.2 cuTexRefDestroy (CUtexref hTexRef)<br />

Destroys the texture reference specified by hTexRef.<br />

Parameters:<br />

hTexRef - Texture reference to destroy<br />

Returns:<br />

<strong>CUDA</strong>_SUCCESS, <strong>CUDA</strong>_ERROR_DEINITIALIZED, <strong>CUDA</strong>_ERROR_NOT_INITIALIZED, <strong>CUDA</strong>_-<br />

ERROR_INVALID_CONTEXT, <strong>CUDA</strong>_ERROR_INVALID_VALUE<br />

See also:<br />

cuTexRefCreate, cuTexRefSetAddress, cuTexRefSetAddress2D, cuTexRefSetAddressMode, cuTexRefSetArray,<br />

cuTexRefSetFilterMode, cuTexRefSetFlags, cuTexRefSetFormat, cuTexRefGetAddress, cuTexRefGetAddress-<br />

Mode, cuTexRefGetArray, cuTexRefGetFilterMode, cuTexRefGetFlags, cuTexRefGetFormat<br />

4.31.2.3 cuTexRefGetAddress (CUdeviceptr ∗ pdptr, CUtexref hTexRef)<br />

Returns in ∗pdptr the base address bound to the texture reference hTexRef, or returns <strong>CUDA</strong>_ERROR_-<br />

INVALID_VALUE if the texture reference is not bound to any device memory range.<br />

Generated for <strong>NVIDIA</strong> <strong>CUDA</strong> Library by Doxygen

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!