nvcc_detail/hip_runtime_api.h: add missing hipDeviceSetCacheConfig API

Signed-off-by: Steven Noonan <steven@uplinklabs.net>
This commit is contained in:
Steven Noonan
2019-03-06 11:21:10 -08:00
rodzic 88b4621dbd
commit ee750d5ea4
@@ -79,6 +79,12 @@ typedef enum hipChannelFormatKind {
#define hipBoundaryModeTrap cudaBoundaryModeTrap
#define hipBoundaryModeClamp cudaBoundaryModeClamp
// hipFuncCache
#define hipFuncCachePreferNone cudaFuncCachePreferNone
#define hipFuncCachePreferShared cudaFuncCachePreferShared
#define hipFuncCachePreferL1 cudaFuncCachePreferL1
#define hipFuncCachePreferEqual cudaFuncCachePreferEqual
// hipResourceType
#define hipResourceType cudaResourceType
#define hipResourceTypeArray cudaResourceTypeArray
@@ -614,6 +620,10 @@ inline static hipError_t hipDeviceGetCacheConfig(hipFuncCache_t* pCacheConfig) {
return hipCUDAErrorTohipError(cudaDeviceGetCacheConfig(pCacheConfig));
}
inline static hipError_t hipDeviceSetCacheConfig(hipFuncCache_t cacheConfig) {
return hipCUDAErrorTohipError(cudaDeviceSetCacheConfig(cacheConfig));
}
inline static const char* hipGetErrorString(hipError_t error) {
return cudaGetErrorString(hipErrorToCudaError(error));
}