12.07.2015 Views

NVIDIA CUDA

NVIDIA CUDA

NVIDIA CUDA

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

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

166 Module DocumentationParameters:pFormat - Returned formatpNumPackedComponents - Returned number of componentshTexRef - Texture referenceReturns:<strong>CUDA</strong>_SUCCESS, <strong>CUDA</strong>_ERROR_DEINITIALIZED, <strong>CUDA</strong>_ERROR_NOT_INITIALIZED, <strong>CUDA</strong>_-ERROR_INVALID_CONTEXT, <strong>CUDA</strong>_ERROR_INVALID_VALUESee also:cuTexRefCreate, cuTexRefDestroy, cuTexRefSetAddress, cuTexRefSetAddress2D, cuTexRefSetAddressMode,cuTexRefSetArray, cuTexRefSetFilterMode, cuTexRefSetFlags, cuTexRefSetFormat, cuTexRefGetAddress, cu-TexRefGetAddressMode, cuTexRefGetArray, cuTexRefGetFilterMode, cuTexRefGetFlags3.26.2.9 CUresult cuTexRefSetAddress (unsigned int ∗ pOffset, CUtexref hTexRef, CUdeviceptr dptr,unsigned int bytes)Binds a linear address range to the texture reference hTexRef. Any previous address or <strong>CUDA</strong> array state associatedwith the texture reference is superseded by this function. Any memory previously bound to hTexRef is unbound.Since the hardware enforces an alignment requirement on texture base addresses, cuTexRefSetAddress() passes backa byte offset in ∗pOffset that must be applied to texture fetches in order to read from the desired memory. Thisoffset must be divided by the texel size and passed to kernels that read from the texture so they can be applied to thetex1Dfetch() function.If the device memory pointer was returned from cuMemAlloc(), the offset is guaranteed to be 0 and NULL may bepassed as the pOffset parameter.Parameters:pOffset - Returned byte offsethTexRef - Texture reference to binddptr - Device pointer to bindbytes - Size of memory to bind in bytesReturns:<strong>CUDA</strong>_SUCCESS, <strong>CUDA</strong>_ERROR_DEINITIALIZED, <strong>CUDA</strong>_ERROR_NOT_INITIALIZED, <strong>CUDA</strong>_-ERROR_INVALID_CONTEXT, <strong>CUDA</strong>_ERROR_INVALID_VALUESee also:cuTexRefCreate, cuTexRefDestroy, cuTexRefSetAddress2D, cuTexRefSetAddressMode, cuTexRefSetArray, cu-TexRefSetFilterMode, cuTexRefSetFlags, cuTexRefSetFormat, cuTexRefGetAddress, cuTexRefGetAddress-Mode, cuTexRefGetArray, cuTexRefGetFilterMode, cuTexRefGetFlags, cuTexRefGetFormat3.26.2.10 CUresult cuTexRefSetAddress2D (CUtexref hTexRef, const <strong>CUDA</strong>_ARRAY_DESCRIPTOR ∗desc, CUdeviceptr dptr, unsigned int PitchInBytes)Binds a linear address range to the texture reference hTexRef. Any previous address or <strong>CUDA</strong> array state associatedwith the texture reference is superseded by this function. Any memory previously bound to hTexRef is unbound.Generated on Wed Apr 1 16:11:42 2009 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!