From 34ab2a55abc0184bbd9c51ae0dc5dc65cd68fb1b Mon Sep 17 00:00:00 2001 From: Aditya Atluri Date: Thu, 13 Oct 2016 15:13:11 -0500 Subject: [PATCH] changed hipLimit to hipLimit_t and data type to enum Change-Id: I94f408cdcac4b0bb38801d58709b68e9630d44d0 --- hipamd/include/hip/hcc_detail/hip_runtime_api.h | 8 +++++--- hipamd/src/hip_device.cpp | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hipamd/include/hip/hcc_detail/hip_runtime_api.h b/hipamd/include/hip/hcc_detail/hip_runtime_api.h index 135e307b6e..47e82b971c 100644 --- a/hipamd/include/hip/hcc_detail/hip_runtime_api.h +++ b/hipamd/include/hip/hcc_detail/hip_runtime_api.h @@ -60,7 +60,10 @@ typedef void* hipDeviceptr_t; typedef struct ihipEvent_t *hipEvent_t; -typedef unsigned hipLimit; +enum hipLimit_t +{ + hipLimitMallocHeapSize = 0x02, +}; /** * @addtogroup GlobalDefs More @@ -98,7 +101,6 @@ typedef unsigned hipLimit; #define hipDeviceMapHost 0x8 #define hipDeviceLmemResizeToMax 0x16 -#define hipLimitMallocHeapSize 0x2 /** * @warning On AMD devices and recent Nvidia devices, these hints and controls are ignored. @@ -336,7 +338,7 @@ hipError_t hipDeviceGetCacheConfig ( hipFuncCache *cacheConfig ); * Note: Currently, only hipLimitMallocHeapSize is available * */ -hipError_t hipDeviceGetLimit(size_t *pValue, hipLimit limit); +hipError_t hipDeviceGetLimit(size_t *pValue, hipLimit_t limit); /** diff --git a/hipamd/src/hip_device.cpp b/hipamd/src/hip_device.cpp index db04985cf1..c4cf7342c4 100644 --- a/hipamd/src/hip_device.cpp +++ b/hipamd/src/hip_device.cpp @@ -88,7 +88,7 @@ hipError_t hipDeviceGetCacheConfig(hipFuncCache *cacheConfig) extern "C" size_t g_malloc_heap_size; -hipError_t hipDeviceGetLimit (size_t *pValue, hipLimit limit) +hipError_t hipDeviceGetLimit (size_t *pValue, hipLimit_t limit) { HIP_INIT_API(pValue, limit); if(pValue == nullptr) {