Add hipBindTexture2D on NVCC path (#1773)

This commit is contained in:
Rahul Garg
2020-01-05 23:03:50 -08:00
committed by Maneesh Gupta
parent 785a4440c8
commit a5d7e7d8d3
2 changed files with 6 additions and 11 deletions
@@ -1383,6 +1383,12 @@ inline static hipError_t hipBindTexture(size_t* offset, struct textureReference*
return hipCUDAErrorTohipError(cudaBindTexture(offset, tex, devPtr, desc, size));
}
inline static hipError_t hipBindTexture2D(size_t* offset, struct textureReference* tex, const void* devPtr,
const hipChannelFormatDesc* desc, size_t width, size_t height,
size_t pitch) {
return hipCUDAErrorTohipError(cudaBindTexture2D(offset, tex, devPtr, desc, width, height, pitch));
}
inline static hipChannelFormatDesc hipCreateChannelDesc(int x, int y, int z, int w,
hipChannelFormatKind f) {
return cudaCreateChannelDesc(x, y, z, w, hipChannelFormatKindToCudaChannelFormatKind(f));