[Openmp-commits] [PATCH] D128347: [OpenMP] Implementing omp_get_device_num()
Shilei Tian via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed Jun 22 08:28:29 PDT 2022
tianshilei1992 added inline comments.
================
Comment at: openmp/libomptarget/src/api.cpp:35
+ TIMESCOPE();
+ int hostDevice = omp_get_num_devices();
+
----------------
The spec says:
> When called on the host device, it will return the same value as the omp_get_initial_device routine.
Therefore I suggest we call `omp_get_initial_device` here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128347/new/
https://reviews.llvm.org/D128347
More information about the Openmp-commits
mailing list