12.07.2015 Views

NVIDIA CUDA

NVIDIA CUDA

NVIDIA CUDA

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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3.26 Texture Reference Management 1693.26.2.14 CUresult cuTexRefSetFlags (CUtexref hTexRef, unsigned int Flags)Specifies optional flags via Flags to specify the behavior of data returned through the texture reference hTexRef.The valid flags are:• CU_TRSF_READ_AS_INTEGER, which suppresses the default behavior of having the texture promote integerdata to floating point data in the range [0, 1];• CU_TRSF_NORMALIZED_COORDINATES, which suppresses the default behavior of having the texture coordinatesrange from [0, Dim) where Dim is the width or height of the <strong>CUDA</strong> array. Instead, the texturecoordinates [0, 1.0) reference the entire breadth of the array dimension;Parameters:hTexRef - Texture referenceFlags - Optional flags to setReturns:<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, cuTexRefSetFormat, cuTexRefGetAddress, cuTexRefGetAddress-Mode, cuTexRefGetArray, cuTexRefGetFilterMode, cuTexRefGetFlags, cuTexRefGetFormat3.26.2.15 CUresult cuTexRefSetFormat (CUtexref hTexRef, CUarray_format Format, int NumChannels)Specifies the format of the data to be read by the texture reference hTexRef. Format and NumChannels areexactly analogous to the Format and NumChannels members of the <strong>CUDA</strong>_ARRAY_DESCRIPTOR structure: Theyspecify the format of each component and the number of components per array element.Parameters:hTexRef - Texture referenceFormat - Format to setNumChannels - Number of components per array elementReturns:<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, cuTexRefGetAddress, cuTexRefGetAddress-Mode, cuTexRefGetArray, cuTexRefGetFilterMode, cuTexRefGetFlags, cuTexRefGetFormatGenerated 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!