|  | 
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 sizebytes of the memory area pointed to bydevPtrto texture referencetex.descdescribes how the memory is interpreted when fetching values from the texture. Theoffsetparameter is an optional byte offset as with the low-level cudaBindTexture() function. Any memory previously bound totexis 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) 
 
     |