aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/extend.texi4
-rw-r--r--gcc/doc/invoke.texi21
2 files changed, 22 insertions, 3 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 0978c4c..bad3408 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -7336,7 +7336,7 @@ truncate the copy without appending the terminating @code{NUL} character.
Using the attribute makes it possible to suppress the warning. However,
when the array is declared with the attribute the call to @code{strlen} is
diagnosed because when the array doesn't contain a @code{NUL}-terminated
-string the call is undefined. To copy, compare, of search non-string
+string the call is undefined. To copy, compare, or search non-string
character arrays use the @code{memcpy}, @code{memcmp}, @code{memchr},
and other functions that operate on arrays of bytes. In addition,
calling @code{strnlen} and @code{strndup} with such arrays is safe
@@ -10695,7 +10695,7 @@ influence run-time behavior.
GCC strives to be compatible with the
@uref{https://www.openacc.org/, OpenACC Application Programming
-Interface v2.6}.
+Interface v2.7}.
To enable the processing of OpenACC directives @samp{#pragma acc}
in C and C++, GCC needs to be invoked with the @option{-fopenacc} option.
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 617a3d8..3135821 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -302,6 +302,7 @@ Objective-C and Objective-C++ Dialects}.
@item OpenMP and OpenACC Options
@xref{OpenMP and OpenACC Options,,Options Controlling OpenMP and OpenACC}.
@gccoptlist{-foffload=@var{arg} -foffload-options=@var{arg}
+-foffload-memory=@var{arg}
-fopenacc -fopenacc-dim=@var{geom}
-fopenmp -fopenmp-simd -fopenmp-target-simd-clone@r{[}=@var{device-type}@r{]}}
@@ -5235,6 +5236,20 @@ Typical command lines are
-foffload-options=amdgcn-amdhsa=-march=gfx906
@end smallexample
+@opindex foffload-memory
+@cindex OpenMP offloading memory modes
+@item -foffload-memory=none
+@itemx -foffload-memory=unified
+@itemx -foffload-memory=pinned
+Enable a memory optimization mode to use with OpenMP. The default behavior,
+@option{-foffload-memory=none}, is to do nothing special (unless enabled via
+a requires directive in the code). @option{-foffload-memory=unified} is
+equivalent to @code{#pragma omp requires unified_shared_memory}.
+@option{-foffload-memory=pinned} forces all host memory to be pinned (this
+mode may require the user to increase the ulimit setting for locked memory).
+All translation units must select the same setting to avoid undefined
+behavior.
+
@opindex fopenacc
@cindex OpenACC accelerator programming
@item -fopenacc
@@ -5249,7 +5264,11 @@ have support for @option{-pthread}.
Specify default compute dimensions for parallel offload regions that do
not explicitly specify them. The @var{geom} value is a triple of
@samp{:}-separated sizes, in order @var{gang}, @var{worker}, and @var{vector}.
-A size can be omitted, to use a target-specific default value.
+If a size is to be deferred until execution @samp{-} can be used;
+alternatively a size can be omitted to use a target-specific default value.
+When deferring to runtime, the environment variable @env{GOMP_OPENACC_DIM}
+can be set. It has the same format as the option value, except that
+@samp{-} is not permitted.
@opindex fopenmp
@cindex OpenMP parallel