[Openmp-commits] [openmp] [OpenMP][libomptarget][RFC] extend libomptarget with mechanism to execute fill memory on the target (PR #73801)
Jan Patrick Lehr via Openmp-commits
openmp-commits at lists.llvm.org
Thu Dec 7 02:00:28 PST 2023
================
@@ -2357,6 +2357,14 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy {
getAgent(), (uint64_t)Size);
}
+ /// Fill memory on the target device (aka memset)
+ Error fillMemoryImpl(void *Ptr, int32_t Val, uint64_t NumValues,
+ AsyncInfoWrapperTy &AsyncInfoWrapperTy) override {
+ hsa_status_t Status =
+ hsa_amd_memory_fill(const_cast<void *>(Ptr), Val, NumValues);
----------------
jplehr wrote:
Why `const_cast<void*>` here? I think the pointer can just be passed to the HSA function.
https://github.com/llvm/llvm-project/pull/73801
More information about the Openmp-commits
mailing list