You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[OpenMP] Add Fortran support for omp_* functions needing adapters
Taking omp_get_uid_from_device and omp_get_device_from_uid as examples.
OpenMP 6.0 defines these functions as follows:
```
const char *omp_get_uid_from_device(int device_num);
character(:) function omp_get_uid_from_device(device_num)
pointer :: omp_get_uid_from_device
integer, intent(in) :: device_num
```
and
```
int omp_get_device_from_uid(const char *uid);
integer function omp_get_device_from_uid(uid)
character(len=*), intent(in) :: uid
```
As a result, we cannot directly map the Fortran API declarations to the
C API declarations. We need some adapter code to do the conversion.
However, this means that we cannot just define the two functions as
omp_* in kmp_ftn_entry.h without clashing with the adapter code.
The current situation is less than ideal, as demonstrated by this draft
PR, which shall serve as a base for discussing different solution
approaches.
0 commit comments