[Openmp-commits] [openmp] [OpenMP][libomptarget][RFC] extend libomptarget with mechanism to execute fill memory on the target (PR #73801)

Johannes Doerfert via Openmp-commits openmp-commits at lists.llvm.org
Wed Nov 29 08:55:38 PST 2023


================
@@ -1895,6 +1903,29 @@ int32_t __tgt_rtl_data_exchange_async(int32_t SrcDeviceId, void *SrcPtr,
   return OFFLOAD_SUCCESS;
 }
 
+int32_t __tgt_rtl_fill_memory(int32_t DevId, void *Ptr, int32_t ByteVal,
+                              int64_t NumBytes) {
+  return __tgt_rtl_fill_memory_async(DevId, Ptr, ByteVal, NumBytes,
+                                     /* AsyncInfoPtr */ nullptr);
+}
+
+int32_t __tgt_rtl_fill_memory_async(int32_t DevId, void *Ptr, int32_t Val,
+                                    int64_t NumValues,
+                                    __tgt_async_info *AsyncInfo) {
+  printf("--> in function %s\n", __FUNCTION__);
+  printf("--> Dev: %d, Ptr: %p, Val: %d, NumValues: %ld\n", DevId, Ptr, Val,
+         NumValues);
----------------
jdoerfert wrote:

leftover

https://github.com/llvm/llvm-project/pull/73801


More information about the Openmp-commits mailing list