Skip to main content

cudaMallocMipmappedArray

Function cudaMallocMipmappedArray 

Source
pub unsafe extern "C" fn cudaMallocMipmappedArray(
    mipmappedArray: *mut cudaMipmappedArray_t,
    desc: *const cudaChannelFormatDesc,
    extent: cudaExtent,
    numLevels: c_uint,
    flags: c_uint,
) -> cudaError_t
Expand description

Allocate a mipmapped array on the device.

Allocates a CUDA mipmapped array according to the cudaChannelFormatDesc structure desc and returns a handle to the new CUDA mipmapped array in *mipmappedArray. numLevels specifies the number of mipmap levels to be allocated. This value is clamped to the range [1, 1 + floor(log2(max(width, height, depth)))].

The cudaChannelFormatDesc is defined as:

cudaMallocMipmappedArray can allocate the following:

The flags parameter enables different options to be specified that affect the allocation, as follows.

The width, height and depth extents must meet certain size requirements as listed in the following table. All values are specified in elements.

ยงParameters

  • mipmappedArray: Pointer to allocated mipmapped array in device memory.
  • desc: Requested channel format.
  • extent: Requested allocation size (width field in elements).
  • numLevels: Number of mipmap levels to allocate.
  • flags: Flags for extensions.