CUDA Runtime API (PDF) - CUDA Toolkit v5.5 (older) - Last updated May 11, 2013 - Send Feedback

2.25. C++ API Routines

C++-style interface built on top of CUDA runtime API. This section describes the C++ high level API functions of the CUDA runtime application programming interface. To use these functions, your application needs to be compiled with the nvcc compiler.

Functions

template < class T >cudaChannelFormatDesc cudaCreateChannelDesc ( void )
[C++ API] Returns a channel descriptor using the specified format

Functions

template < class T >

cudaChannelFormatDesc cudaCreateChannelDesc ( void ) [inline]

[C++ API] Returns a channel descriptor using the specified format Returns a channel descriptor with format f and number of bits of each component x, y, z, and w. The cudaChannelFormatDesc is defined as:

‎  struct cudaChannelFormatDesc {
    int x, y, z, w;
    enum cudaChannelFormatKind 
                  f;
  };

where cudaChannelFormatKind is one of cudaChannelFormatKindSigned, cudaChannelFormatKindUnsigned, or cudaChannelFormatKindFloat.

See also:

cudaCreateChannelDesc ( Low level), cudaGetChannelDesc, cudaGetTextureReference, cudaBindTexture (High level), cudaBindTexture (High level, inherited channel descriptor), cudaBindTexture2D (High level), cudaBindTextureToArray (High level), cudaBindTextureToArray (High level, inherited channel descriptor), cudaUnbindTexture (High level), cudaGetTextureAlignmentOffset (High level)

Returns

Channel descriptor with format f


CUDA Runtime API (PDF) - CUDA Toolkit v5.5 (older) - Last updated May 11, 2013 - Send Feedback