Function rcudnn_sys::cudaBindTexture[][src]

pub unsafe extern "C" fn cudaBindTexture(
    offset: *mut usize,
    texref: *const textureReference,
    devPtr: *const c_void,
    desc: *const cudaChannelFormatDesc,
    size: usize
) -> cudaError_t
Expand description

\brief Binds a memory area to a texture

\deprecated

Binds \p size bytes of the memory area pointed to by \p devPtr to the texture reference \p texref. \p desc describes how the memory is interpreted when fetching values from the texture. Any memory previously bound to \p texref is unbound.

Since the hardware enforces an alignment requirement on texture base addresses, \ref ::cudaBindTexture(size_t*, const struct textureReference*, const void*, const struct cudaChannelFormatDesc*, size_t) “cudaBindTexture()” returns in \p *offset a byte offset that must be applied to texture fetches in order to read from the desired memory. This offset must be divided by the texel size and passed to kernels that read from the texture so they can be applied to the ::tex1Dfetch() function. If the device memory pointer was returned from ::cudaMalloc(), the offset is guaranteed to be 0 and NULL may be passed as the \p offset parameter.

The total number of elements (or texels) in the linear address range cannot exceed ::cudaDeviceProp::maxTexture1DLinear[0]. The number of elements is computed as (\p size / elementSize), where elementSize is determined from \p desc.

\param offset - Offset in bytes \param texref - Texture to bind \param devPtr - Memory area on device \param desc - Channel format \param size - Size of the memory area pointed to by devPtr

\return ::cudaSuccess, ::cudaErrorInvalidValue, ::cudaErrorInvalidTexture \notefnerr \note_init_rt \note_callback

\sa \ref ::cudaCreateChannelDesc(int, int, int, int, cudaChannelFormatKind) “cudaCreateChannelDesc (C API)”, ::cudaGetChannelDesc, ::cudaGetTextureReference, \ref ::cudaBindTexture(size_t*, const struct texture< T, dim, readMode>&, const void*, const struct cudaChannelFormatDesc&, size_t) “cudaBindTexture (C++ API)”, \ref ::cudaBindTexture2D(size_t*, const struct textureReference*, const void*, const struct cudaChannelFormatDesc*, size_t, size_t, size_t) “cudaBindTexture2D (C API)”, \ref ::cudaBindTextureToArray(const struct textureReference*, cudaArray_const_t, const struct cudaChannelFormatDesc*) “cudaBindTextureToArray (C API)”, \ref ::cudaUnbindTexture(const struct textureReference*) “cudaUnbindTexture (C API)”, \ref ::cudaGetTextureAlignmentOffset(size_t*, const struct textureReference*) “cudaGetTextureAlignmentOffset (C API)”, ::cuTexRefSetAddress, ::cuTexRefSetAddressMode, ::cuTexRefSetFormat, ::cuTexRefSetFlags, ::cuTexRefSetBorderColor