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.

82 Module Documentation• templatecudaError_t cudaSetupArgument (T arg, size_t offset)[C++ API] Configure a device launch• templatecudaError_t cudaUnbindTexture (const struct texture< T, dim, readMode > &tex)[C++ API] Unbinds a texture3.14.1 Detailed DescriptionThis section describes the C++ high level API functions of the <strong>CUDA</strong> runtime application programming interface. Touse these functions, your application needs to be compiled with the nvcc compiler.3.14.2 Function Documentation3.14.2.1 template cudaError_tcudaBindTexture (size_t ∗ offset, const struct texture< T, dim, readMode > & tex, const void ∗devPtr, size_t size = UINT_MAX)Binds size bytes of the memory area pointed to by devPtr to texture reference tex. The channel descriptor isinherited from the texture reference type. The offset parameter is an optional byte offset as with the low-levelcudaBindTexture(size_t∗, const struct textureReference∗, const void∗, const struct cudaChannelFormatDesc∗, size_t)function. Any memory previously bound to tex is unbound.Parameters:offset - Offset in bytestex - Texture to binddevPtr - Memory area on devicesize - Size of the memory area pointed to by devPtrReturns: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),cudaBindTexture (C++ API, inherited channel descriptor), cudaBindTexture2D (C++ API), cudaBindTexture-ToArray (C++ API), cudaBindTextureToArray (C++ API, inherited channel descriptor), cudaUnbindTexture (C++API), cudaGetTextureAlignmentOffset (C++ API)3.14.2.2 template cudaError_tcudaBindTexture (size_t ∗ offset, const struct texture< T, dim, readMode > & tex, const void ∗devPtr, const struct cudaChannelFormatDesc & desc, size_t size = UINT_MAX)Binds size bytes of the memory area pointed to by devPtr to texture reference tex. desc describes how thememory is interpreted when fetching values from the texture. The offset parameter is an optional byte offset aswith the low-level cudaBindTexture() function. Any memory previously bound to tex 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!