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.

4.19 C++ API Routines 103<br />

• template<br />

cudaError_t cudaLaunch (T ∗entry)<br />

[C++ API] Launches a device function<br />

• template<br />

cudaError_t cudaSetupArgument (T arg, size_t offset)<br />

[C++ API] Configure a device launch<br />

• template<br />

cudaError_t cudaUnbindTexture (const struct texture< T, dim, readMode > &tex)<br />

[C++ API] Unbinds a texture<br />

4.19.1 Detailed Description<br />

This section describes the C++ high level API functions of the <strong>CUDA</strong> runtime application programming interface. To<br />

use these functions, your application needs to be compiled with the nvcc compiler.<br />

4.19.2 Function Documentation<br />

4.19.2.1 template cudaError_t<br />

cudaBindTexture (size_t ∗ offset, const struct texture< T, dim, readMode > & tex, const void ∗<br />

devPtr, size_t size = UINT_MAX)<br />

Binds size bytes of the memory area pointed to by devPtr to texture reference tex. The channel descriptor is<br />

inherited from the texture reference type. The offset parameter is an optional byte offset as with the low-level<br />

cudaBindTexture(size_t∗, const struct textureReference∗, const void∗, const struct cudaChannelFormatDesc∗, size_t)<br />

function. Any memory previously bound to tex is unbound.<br />

Parameters:<br />

offset - Offset in bytes<br />

tex - Texture to bind<br />

devPtr - Memory area on device<br />

size - Size of the memory area pointed to by devPtr<br />

Returns:<br />

Note:<br />

See also:<br />

cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidDevicePointer, cudaErrorInvalidTexture<br />

Note that this function may also return error codes from previous, asynchronous launches.<br />

cudaCreateChannelDesc (C++ API), cudaGetChannelDesc, cudaGetTextureReference, cudaBindTexture (C API),<br />

cudaBindTexture (C++ API, inherited channel descriptor), cudaBindTexture2D (C++ API), cudaBindTexture-<br />

ToArray (C++ API), cudaBindTextureToArray (C++ API, inherited channel descriptor), cudaUnbindTexture (C++<br />

API), cudaGetTextureAlignmentOffset (C++ API)<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!