[Openmp-commits] [PATCH] D128347: [OpenMP] Implementing omp_get_device_num()

Jose Manuel Monsalve Diaz via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Jun 22 08:11:02 PDT 2022


josemonsalve2 created this revision.
josemonsalve2 added reviewers: jdoerfert, jhuber6, JonChesterfield, tianshilei1992.
Herald added subscribers: guansong, yaxunl.
Herald added a project: All.
josemonsalve2 requested review of this revision.
Herald added subscribers: openmp-commits, sstefan1.
Herald added a project: OpenMP.

This patch implements omp_get_device_num() in the host and the device.

It uses the already existing getDeviceNum in the device config for the device.
And in the host it uses the omp_get_num_devices().

Two simple tests added


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D128347

Files:
  openmp/libomptarget/DeviceRTL/include/Configuration.h
  openmp/libomptarget/DeviceRTL/include/Interface.h
  openmp/libomptarget/DeviceRTL/src/State.cpp
  openmp/libomptarget/include/omptarget.h
  openmp/libomptarget/src/api.cpp
  openmp/libomptarget/src/exports
  openmp/libomptarget/test/api/omp_get_device_num.c
  openmp/runtime/test/api/omp_get_device_num.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128347.439029.patch
Type: text/x-patch
Size: 4313 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20220622/18d3d6df/attachment.bin>


More information about the Openmp-commits mailing list