aboutsummaryrefslogtreecommitdiff
path: root/libcpp/macro.c
diff options
context:
space:
mode:
authorKwok Cheung Yeung <kcy@codesourcery.com>2020-10-20 04:15:59 -0700
committerKwok Cheung Yeung <kcy@codesourcery.com>2020-10-20 04:16:26 -0700
commit1bfc07d150790fae93184a79a7cce897655cb37b (patch)
tree6e596730698b9ed4a72930de00b3ed632e124436 /libcpp/macro.c
parent94fd05f1f76faca9dc9033b55d44c960155d38e9 (diff)
downloadgcc-1bfc07d150790fae93184a79a7cce897655cb37b.zip
gcc-1bfc07d150790fae93184a79a7cce897655cb37b.tar.gz
gcc-1bfc07d150790fae93184a79a7cce897655cb37b.tar.bz2
openmp: Implement support for OMP_TARGET_OFFLOAD environment variable
This implements support for the OMP_TARGET_OFFLOAD environment variable introduced in the OpenMP 5.0 standard, which controls how offloading is handled. It may be set to MANDATORY (abort if offloading cannot be performed), DISABLED (no offloading to devices) or DEFAULT (offload to device if possible, fall back to host if not). 2020-10-20 Kwok Cheung Yeung <kcy@codesourcery.com> libgomp/ * env.c (gomp_target_offload_var): New. (parse_target_offload): New. (handle_omp_display_env): Print value of OMP_TARGET_OFFLOAD. (initialize_env): Parse OMP_TARGET_OFFLOAD. * libgomp.h (gomp_target_offload_t): New. (gomp_target_offload_var): New. * libgomp.texi (OMP_TARGET_OFFLOAD): New section. * target.c (resolve_device): Generate error if device not found and offloading is mandatory. (gomp_target_fallback): Generate error if offloading is mandatory. (GOMP_target): Add argument in call to gomp_target_fallback. (GOMP_target_ext): Likewise. (gomp_target_data_fallback): Generate error if offloading is mandatory. (GOMP_target_data): Add argument in call to gomp_target_data_fallback. (GOMP_target_data_ext): Likewise. (gomp_target_task_fn): Add argument in call to gomp_target_fallback. (gomp_target_init): Return early if offloading is disabled.
Diffstat (limited to 'libcpp/macro.c')
0 files changed, 0 insertions, 0 deletions