aboutsummaryrefslogtreecommitdiff
path: root/libgomp/env.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgomp/env.c')
-rw-r--r--libgomp/env.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libgomp/env.c b/libgomp/env.c
index 626a753..f48a95e 100644
--- a/libgomp/env.c
+++ b/libgomp/env.c
@@ -124,6 +124,7 @@ size_t gomp_affinity_format_len;
char *goacc_device_type;
int goacc_device_num;
int goacc_default_dims[GOMP_DIM_MAX];
+int gomp_reverse_offload_threads = 8; /* Reasonable default. */
#ifndef LIBGOMP_OFFLOADED_ONLY
@@ -2489,6 +2490,11 @@ initialize_env (void)
handle_omp_display_env ();
+ /* Control the number of background threads reverse offload is permitted
+ to use. */
+ parse_int_secure ("GOMP_REVERSE_OFFLOAD_THREADS",
+ &gomp_reverse_offload_threads, false);
+
/* OpenACC. */
if (!parse_int ("ACC_DEVICE_NUM", getenv ("ACC_DEVICE_NUM"),