Skip to content

Commit 972e2af

Browse files
SWDEV-546322 Implement hipMipmappedArrayGetMemoryRequirements
(#1221) Signed-off-by: Sebastian Luzynski <Sebastian.Luzynski@amd.com> [rocm-systems] ROCm/rocm-systems#1221 (commit 0c0ba0a)
1 parent e5ea949 commit 972e2af

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

include/hip/hip_runtime_api.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2017,6 +2017,14 @@ typedef struct HIP_LAUNCH_CONFIG_st {
20172017
unsigned int numAttrs; ///< Number of attributes
20182018
} HIP_LAUNCH_CONFIG;
20192019

2020+
/**
2021+
* Struct representing array memory requirements.
2022+
*/
2023+
typedef struct hipArrayMemoryRequirements {
2024+
size_t alignment;
2025+
size_t size;
2026+
} hipArrayMemoryRequirements;
2027+
20202028
/**
20212029
* Requested handle type for address range.
20222030
*/
@@ -5844,6 +5852,24 @@ hipError_t hipMemcpy3DPeer(hipMemcpy3DPeerParms* p);
58445852
* @returns #hipSuccess, #hipErrorInvalidValue, hipErrorInvalidDevice
58455853
*/
58465854
hipError_t hipMemcpy3DPeerAsync(hipMemcpy3DPeerParms* p, hipStream_t stream __dparm(0));
5855+
5856+
/**
5857+
* @brief Returns the memory requirements of a HIP mipmapped array.
5858+
*
5859+
* @param[out] memoryRequirements Pointer to hipArrayMemoryRequirements
5860+
* @param[in] mipmap HIP mipmapped array to get the memory requirements of
5861+
* @param[in] device Device to get the memory requirements for
5862+
*
5863+
* @returns #hipSuccess, #hipErrorInvalidValue
5864+
*
5865+
* Returns the memory requirements of a HIP mipmapped array in memoryRequirements.
5866+
*
5867+
* The returned value in hipArrayMemoryRequirements::size represents the total size of the HIP
5868+
mipmapped array. The returned value in hipArrayMemoryRequirements::alignment represents the
5869+
alignment necessary for mapping the HIP mipmapped array.
5870+
*/
5871+
hipError_t hipMipmappedArrayGetMemoryRequirements(hipArrayMemoryRequirements* memoryRequirements,
5872+
hipMipmappedArray_t mipmap, hipDevice_t device);
58475873
// doxygen end Memory
58485874
/**
58495875
* @}

0 commit comments

Comments
 (0)