[OpenMP] Implementing omp_get_device_num()
authorJose M Monsalve Diaz <jmonsalvediaz@anl.gov>
Wed, 22 Jun 2022 15:05:34 +0000 (10:05 -0500)
committerJose M Monsalve Diaz <jmonsalvediaz@anl.gov>
Wed, 29 Jun 2022 07:18:21 +0000 (02:18 -0500)
commit616dd9ae143172472bde793683d6e4df79554ac8
treeefbc95200d02f623cdbf178768a1f5f7fcbdd546
parentcbeca742a4e6a8d713e6a825bb8f475e5b80821e
[OpenMP] Implementing omp_get_device_num()

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

Differential Revision: https://reviews.llvm.org/D128347
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 [new file with mode: 0644]
openmp/runtime/test/api/omp_get_device_num.c [new file with mode: 0644]