libgomp: Add omp_get_gprivate_limit API routine
Adds OpenMP API routine to query the limit of group-private variables.
This change introduces the omp_get_gprivate_limit OpenMP runtime API routine. This function returns the maximum possible limit for group-private variables, whether specified via directives or the dyn_groupprivate clause. While the API is added, the current implementation always returns 0 for simplicity, as support for groupprivate is device-specific and dyn_groupprivate is still under development. New tests are included for C and Fortran.
In Details
A new OpenMP runtime API routine, omp_get_gprivate_limit, has been added to libgomp. This function is intended to report the maximum number of group-private variables supported by the runtime or a specific device. The implementation in omp-general.cc and target.c currently returns 0, acknowledging that full support for dynamic group-private variables across all devices is ongoing. The change also introduces related definitions in omp.h.in and updates documentation and tests. Note the presence of omp_access_pteam constant which is not currently specified for use.
- libgomp
- GCC's implementation of the OpenMP runtime library, responsible for managing parallel regions and threads.
- OpenMP
- A standardized API for shared-memory parallel programming. It consists of compiler directives, library routines, and environment variables.
- group-private
- An OpenMP variable scope where a variable is private to each thread within a group of threads, rather than to each individual thread or being shared across all threads.
- dyn_groupprivate clause
- An OpenMP clause that allows for dynamic management of group-private variables, providing more flexibility in specifying their scope and lifetime.