[Openmp-commits] [PATCH] D97883: [libomptarget] Add allocator support for target memory

George Rokos via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Mar 15 11:59:03 PDT 2021


grokos added inline comments.


================
Comment at: openmp/libomptarget/include/omptarget.h:203
+void *llvm_omp_target_alloc_device(size_t size, int device_num);
+void *llvm_omp_target_alloc_host(size_t size, int device_num);
+void *llvm_omp_target_alloc_shared(size_t size, int device_num);
----------------
JonChesterfield wrote:
> Is alloc_host expected to ignore the device_num argument?
That's a good question. On the surface of it I would say yes, it makes sense to ignore the device ID when allocating on the host. However, bear in mind that these functions are not standardized yet, so the exact behavior may change to something that makes use of the device ID.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97883/new/

https://reviews.llvm.org/D97883



More information about the Openmp-commits mailing list