[Openmp-commits] [PATCH] D95104: [OpenMP] Replace `cuda.h` with (forward) declarations in the offload plugin
Artem Belevich via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed Jan 20 16:30:57 PST 2021
tra added inline comments.
================
Comment at: openmp/libomptarget/plugins/cuda/src/rtl.cpp:76-77
+ void **);
+#define cuMemAlloc cuMemAlloc_v2
+CUresult cuMemAlloc(CUdeviceptr *, size_t);
+#define cuMemcpyDtoDAsync cuMemcpyDtoDAsync_v2
----------------
Nit: I'd suggest declaring the functions with their real names and only use the macro to affect the callers.
Hiding the declaration behind the macro appears to just hide things unnecessarily.
```
#define cuMemAlloc cuMemAlloc_v2
CUresult cuMemAlloc_v2(CUdeviceptr *, size_t);
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95104/new/
https://reviews.llvm.org/D95104
More information about the Openmp-commits
mailing list