diff options
author | Thomas Schwinge <tschwinge@baylibre.com> | 2024-07-16 17:09:38 +0200 |
---|---|---|
committer | Thomas Schwinge <tschwinge@baylibre.com> | 2024-07-19 21:55:47 +0200 |
commit | a95c1911d8e8fd0c76fc67232ebc1176162ec8d7 (patch) | |
tree | b565c48e0a2e5a5b38020e80e84c3a4d9b80a308 /libgomp/target.c | |
parent | f9119948cedefa07a667e8beacbd5317a4d8ec1b (diff) | |
download | gcc-a95c1911d8e8fd0c76fc67232ebc1176162ec8d7.zip gcc-a95c1911d8e8fd0c76fc67232ebc1176162ec8d7.tar.gz gcc-a95c1911d8e8fd0c76fc67232ebc1176162ec8d7.tar.bz2 |
libgomp: Document 'GOMP_teams4'
For reference:
- <https://inbox.sourceware.org/20211111190313.GV2710@tucnak> "[PATCH] openmp: Honor OpenMP 5.1 num_teams lower bound"
- <https://inbox.sourceware.org/20211112132023.GC2710@tucnak> "[PATCH] libgomp, nvptx: Honor OpenMP 5.1 num_teams lower bound"
libgomp/
* config/gcn/target.c (GOMP_teams4): Document.
* config/nvptx/target.c (GOMP_teams4): Likewise.
* target.c (GOMP_teams4): Likewise.
Diffstat (limited to 'libgomp/target.c')
-rw-r--r-- | libgomp/target.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libgomp/target.c b/libgomp/target.c index 4868992..aa01c13 100644 --- a/libgomp/target.c +++ b/libgomp/target.c @@ -4352,6 +4352,8 @@ gomp_target_task_fn (void *data) return false; } +/* Implement OpenMP 'teams' construct, legacy entry point. */ + void GOMP_teams (unsigned int num_teams, unsigned int thread_limit) { @@ -4364,6 +4366,13 @@ GOMP_teams (unsigned int num_teams, unsigned int thread_limit) (void) num_teams; } +/* Implement OpenMP 'teams' construct. + + Initialize upon FIRST call. Return whether this invocation is active. + Depending on whether NUM_TEAMS_LOW asks for more teams than are provided + in hardware, we may need to loop multiple times; in that case make sure to + update the team-level variable used by 'omp_get_team_num'. */ + bool GOMP_teams4 (unsigned int num_teams_low, unsigned int num_teams_high, unsigned int thread_limit, bool first) |