Skip to content

Commit

Permalink
Merge branch 'mr_extend_gpu_commands' into 'master'
Browse files Browse the repository at this point in the history
Extend GPU commands

See merge request walberla/walberla!681
  • Loading branch information
Markus Holzer committed Sep 23, 2024
2 parents 92b1b97 + db8f7de commit d54725d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/gpu/DeviceWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,13 @@ inline gpuError_t gpuMemcpyAsync(void* /*dst*/, const void* /*src*/, size_t /*co
inline gpuError_t gpuMemcpy3D(const gpuMemcpy3DParms* /*p*/) { WALBERLA_DEVICE_FUNCTION_ERROR }
inline gpuError_t gpuMemcpy3DAsync(const gpuMemcpy3DParms* /*p*/, gpuStream_t /*stream*/) { WALBERLA_DEVICE_FUNCTION_ERROR }

inline gpuError_t gpuMemset(void* /*devPtr*/, int /*value*/, size_t /*count*/) { WALBERLA_DEVICE_FUNCTION_ERROR }
inline gpuError_t gpuMemsetAsync(void* /*devPtr*/, int /*value*/, size_t /*count*/, gpuStream_t /*stream*/) { WALBERLA_DEVICE_FUNCTION_ERROR }
inline gpuError_t gpuMemset2D(void* /*devPtr*/, size_t /*pitch*/, int /*value*/, size_t /*width*/, size_t /*height*/) { WALBERLA_DEVICE_FUNCTION_ERROR }
inline gpuError_t gpuMemset2DAsync(void* /*devPtr*/, size_t /*pitch*/, int /*value*/, size_t /*width*/, size_t /*height*/, gpuStream_t /*stream*/) { WALBERLA_DEVICE_FUNCTION_ERROR }
inline gpuError_t gpuMemset3D(gpuPitchedPtr /*pitchedDevPtr*/, int /*value*/, gpuExtent /*extent*/) { WALBERLA_DEVICE_FUNCTION_ERROR }
inline gpuError_t gpuMemset3DAsync( gpuPitchedPtr /*pitchedDevPtr*/, int /*value*/, gpuExtent /*extent*/, gpuStream_t /*stream*/) { WALBERLA_DEVICE_FUNCTION_ERROR }

inline gpuPos make_gpuPos(size_t /*x*/, size_t /*y*/, size_t /*z*/) { WALBERLA_DEVICE_FUNCTION_ERROR }
inline gpuPitchedPtr make_gpuPitchedPtr (void* /*d*/, size_t /*p*/, size_t /*xsz*/, size_t /*ysz*/) { WALBERLA_DEVICE_FUNCTION_ERROR }
inline gpuExtent make_gpuExtent(size_t /*w*/, size_t /*h*/, size_t /*d*/) { WALBERLA_DEVICE_FUNCTION_ERROR }
Expand Down
14 changes: 14 additions & 0 deletions src/gpu/GPUWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@
#define gpuMemcpy3DParms cudaMemcpy3DParms
#define gpuMemcpy3DAsync cudaMemcpy3DAsync

#define gpuMemset cudaMemset
#define gpuMemsetAsync cudaMemsetAsync
#define gpuMemset2D cudaMemset2D
#define gpuMemset2DAsync cudaMemset2DAsync
#define gpuMemset3D cudaMemset3D
#define gpuMemset3DAsync cudaMemset3DAsync

#define make_gpuPos make_cudaPos
#define make_gpuPitchedPtr make_cudaPitchedPtr
#define gpuPitchedPtr cudaPitchedPtr
Expand Down Expand Up @@ -104,6 +111,13 @@
#define gpuMemcpy3DParms hipMemcpy3DParms
#define gpuMemcpy3DAsync hipMemcpy3DAsync

#define gpuMemset hipMemset
#define gpuMemsetAsync hipMemsetAsync
#define gpuMemset2D hipMemset2D
#define gpuMemset2DAsync hipMemset2DAsync
#define gpuMemset3D hipMemset3D
#define gpuMemset3DAsync hipMemset3DAsync

#define make_gpuPitchedPtr make_hipPitchedPtr
#define make_gpuPos make_hipPos
using gpuPitchedPtr = hipPitchedPtr;
Expand Down

0 comments on commit d54725d

Please sign in to comment.