[OpenMP] Add Fortran support for omp_* functions needing adapters #170374
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Taking omp_get_uid_from_device and omp_get_device_from_uid as examples.
OpenMP 6.0 defines these functions as follows:
and
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.
@mjklemm as discussed