From 1223612331678dae749aec6a125efdf5ccd9e007 Mon Sep 17 00:00:00 2001 From: Rahul Garg Date: Tue, 16 May 2017 07:15:13 +0530 Subject: [PATCH] Added hipMallocPitch on HIP/NVCC path Change-Id: Ie3ba7d3f95acac23805efa919531043b350a3f21 --- include/hip/nvcc_detail/hip_runtime_api.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/hip/nvcc_detail/hip_runtime_api.h b/include/hip/nvcc_detail/hip_runtime_api.h index e9f926b336..69a9b46570 100644 --- a/include/hip/nvcc_detail/hip_runtime_api.h +++ b/include/hip/nvcc_detail/hip_runtime_api.h @@ -204,6 +204,10 @@ inline static hipError_t hipMalloc(void** ptr, size_t size) { return hipCUDAErrorTohipError(cudaMalloc(ptr, size)); } +inline static hipError_t hipMallocPitch(void** ptr, size_t* pitch, size_t width, size_t height) { + return hipCUDAErrorTohipError(cudaMallocPitch(ptr, pitch, width, height)); +} + inline static hipError_t hipFree(void* ptr) { return hipCUDAErrorTohipError(cudaFree(ptr)); }