cuda.bindings._v2.driver.array_get_memory_requirements#

cuda.bindings._v2.driver.array_get_memory_requirements(intptr_t array, int device)#

Returns the memory requirements of a CUDA array.

Returns the memory requirements of a CUDA array in memory_requirements If the CUDA array is not allocated with flag CUDA_ARRAY3D_DEFERRED_MAPPING 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:
  • array (intptr_t) – CUDA array to get the memory requirements of.

  • device (int) – Device to get the memory requirements for.

Returns:

Pointer to

CUDA_ARRAY_MEMORY_REQUIREMENTS.

Return type:

CUDA_ARRAY_MEMORY_REQUIREMENTS_v1

See also

cuArrayGetMemoryRequirements