From 772d21a8b656bc9c6ad5dbacb394517a28afe36a Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Tue, 28 Sep 2021 03:46:50 +0200 Subject: [PATCH] nvidia/cuda: Add cuMemsetD# functions --- source/nvidia/cuda/nvidia-cuda.cpp | 6 ++++++ source/nvidia/cuda/nvidia-cuda.hpp | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/source/nvidia/cuda/nvidia-cuda.cpp b/source/nvidia/cuda/nvidia-cuda.cpp index 8c83b828..da2f44b9 100644 --- a/source/nvidia/cuda/nvidia-cuda.cpp +++ b/source/nvidia/cuda/nvidia-cuda.cpp @@ -157,6 +157,12 @@ streamfx::nvidia::cuda::cuda::cuda() : _library() P_CUDA_LOAD_SYMBOL_OPT_V2(cuMemcpyHtoD); P_CUDA_LOAD_SYMBOL_OPT_V2(cuMemcpyHtoDAsync); P_CUDA_LOAD_SYMBOL_OPT_V2(cuMemHostGetDevicePointer); + P_CUDA_LOAD_SYMBOL_V2(cuMemsetD8); + P_CUDA_LOAD_SYMBOL(cuMemsetD8Async); + P_CUDA_LOAD_SYMBOL_OPT_V2(cuMemsetD16); + P_CUDA_LOAD_SYMBOL_OPT(cuMemsetD16Async); + P_CUDA_LOAD_SYMBOL_OPT_V2(cuMemsetD32); + P_CUDA_LOAD_SYMBOL_OPT(cuMemsetD32Async); // Virtual Memory Management // - Not yet needed. diff --git a/source/nvidia/cuda/nvidia-cuda.hpp b/source/nvidia/cuda/nvidia-cuda.hpp index c43a4440..5929a50b 100644 --- a/source/nvidia/cuda/nvidia-cuda.hpp +++ b/source/nvidia/cuda/nvidia-cuda.hpp @@ -265,6 +265,12 @@ namespace streamfx::nvidia::cuda { P_CUDA_DEFINE_FUNCTION(cuMemcpyHtoAAsync, array_t dst, std::size_t dstOffset, void* src, std::size_t byteCount); P_CUDA_DEFINE_FUNCTION(cuMemcpyHtoD, device_ptr_t dst, void* src, std::size_t byteCount); P_CUDA_DEFINE_FUNCTION(cuMemcpyHtoDAsync, device_ptr_t dst, void* src, std::size_t byteCount); + P_CUDA_DEFINE_FUNCTION(cuMemsetD8, device_ptr_t dst, uint8_t d, size_t byteCount); + P_CUDA_DEFINE_FUNCTION(cuMemsetD8Async, device_ptr_t dst, uint8_t d, size_t byteCount, stream_t stream); + P_CUDA_DEFINE_FUNCTION(cuMemsetD16, device_ptr_t dst, uint16_t d, size_t byteCount); + P_CUDA_DEFINE_FUNCTION(cuMemsetD16Async, device_ptr_t dst, uint16_t d, size_t byteCount, stream_t stream); + P_CUDA_DEFINE_FUNCTION(cuMemsetD32, device_ptr_t dst, uint32_t d, size_t byteCount); + P_CUDA_DEFINE_FUNCTION(cuMemsetD32Async, device_ptr_t dst, uint32_t d, size_t byteCount, stream_t stream); // Virtual Memory Management // - Not yet needed.