Skip to main content

cudaCreateChannelDesc

Function cudaCreateChannelDesc 

Source
pub unsafe extern "C" fn cudaCreateChannelDesc(
    x: c_int,
    y: c_int,
    z: c_int,
    w: c_int,
    f: cudaChannelFormatKind,
) -> cudaChannelFormatDesc
Expand description

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.

§Return value

Channel descriptor with format f

See also: ::cudaCreateChannelDesc(void) “cudaCreateChannelDesc (C++ API)”, ::cudaGetChannelDesc, ::cudaCreateTextureObject, ::cudaCreateSurfaceObject

§Parameters

  • x: - X component
  • y: - Y component
  • z: - Z component
  • w: - W component
  • f: - Channel format