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.

3.12 Texture Reference Management 77Note:See also:Note that this function may also return error codes from previous, asynchronous launches.cudaCreateChannelDesc (C API), cudaGetChannelDesc, cudaGetTextureReference, cudaBindTexture (C API),cudaBindTexture2D (C++ API), cudaBindTextureToArray (C API), cudaBindTextureToArray (C API), cudaGet-TextureAlignmentOffset (C API)3.12.2.3 cudaError_t cudaBindTextureToArray (const struct textureReference ∗ texref, const structcudaArray ∗ array, const struct cudaChannelFormatDesc ∗ desc)Binds the <strong>CUDA</strong> array array to the texture reference texref. desc describes how the memory is interpreted whenfetching values from the texture. Any <strong>CUDA</strong> array previously bound to texref is unbound.Parameters:texref - Texture to bindarray - Memory array on devicedesc - Channel formatReturns:Note:See also:cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidDevicePointer, cudaErrorInvalidTextureNote that this function may also return error codes from previous, asynchronous launches.cudaCreateChannelDesc (C API), cudaGetChannelDesc, cudaGetTextureReference, cudaBindTexture (C API),cudaBindTexture2D (C API), cudaBindTextureToArray (C++ API), cudaUnbindTexture (C API), cudaGetTextureAlignmentOffset(C API)3.12.2.4 struct cudaChannelFormatDesc cudaCreateChannelDesc (int x, int y, int z, int w, enumcudaChannelFormatKind f) [read]Returns a channel descriptor with format f and number of bits of each component x, y, z, and w. The cudaChannelFormatDescis defined as:struct cudaChannelFormatDesc {int x, y, z, w;enum cudaChannelFormatKind f;};where cudaChannelFormatKind is one of cudaChannelFormatKindSigned, cudaChannelFormatKindUnsigned, or cudaChannelFormatKindFloat.Parameters:x - X componenty - Y componentGenerated 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!