Skip to main content

cuArrayGetMemoryRequirements

Function cuArrayGetMemoryRequirements 

Source
pub unsafe extern "C" fn cuArrayGetMemoryRequirements(
    memoryRequirements: *mut CUDA_ARRAY_MEMORY_REQUIREMENTS,
    array: CUarray,
    device: CUdevice,
) -> CUresult
Expand description

Returns the memory requirements of a CUDA array.

Returns the memory requirements of a CUDA array in memoryRequirements If the CUDA array is not allocated with flag CUDA_ARRAY3D_DEFERRED_MAPPING cudaError_enum::CUDA_ERROR_INVALID_VALUE will be returned.

The returned value in CUDA_ARRAY_MEMORY_REQUIREMENTS::size represents the total size of the CUDA array. The returned value in CUDA_ARRAY_MEMORY_REQUIREMENTS::alignment represents the alignment necessary for mapping the CUDA array.

§Parameters

  • memoryRequirements: Pointer to CUDA_ARRAY_MEMORY_REQUIREMENTS.
  • array: CUDA array to get the memory requirements of.
  • device: Device to get the memory requirements for.

§Return value

See also: cuMipmappedArrayGetMemoryRequirements, cuMemMapArrayAsync.