|
|
template<class T , int dim, enum cudaTextureReadMode readMode>
| cudaError_t cudaBindTexture |
( |
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 the memory is interpreted when fetching values from the texture. The offset parameter is an optional byte offset as with the low-level cudaBindTexture() function. Any memory previously bound to tex is unbound.
- Parameters:
-
| offset | - Offset in bytes |
| tex | - Texture to bind |
| devPtr | - Memory area on device |
| desc | - Channel format |
| size | - Size of the memory area pointed to by devPtr |
- Returns:
- cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidDevicePointer, cudaErrorInvalidTexture
- Note:
- Note that this function may also return error codes from previous, asynchronous launches.
- See also:
- cudaCreateChannelDesc (C++ API), cudaGetChannelDesc, cudaGetTextureReference, cudaBindTexture (C API), cudaBindTexture (C++ API, inherited channel descriptor), cudaBindTexture2D (C++ API), cudaBindTexture2D (C++ API, inherited channel descriptor), cudaBindTextureToArray (C++ API), cudaBindTextureToArray (C++ API, inherited channel descriptor), cudaUnbindTexture (C++ API), cudaGetTextureAlignmentOffset (C++ API)
|