OpenMP-Examples/Deprecated_Features.tex
2024-11-13 11:07:08 -08:00

283 lines
10 KiB
TeX

\cchapter{Feature Deprecations and Updates in Examples}{deprecated_features}
\label{chap:deprecated_features}
\label{sec:deprecated_features}
\index{deprecated features}
\newcommand\tabpcont[1]{\multicolumn{2}{l}{\small\slshape table continued #1 page}}
\newcommand\tabpheader{\textbf{Version} & \textbf{Deprecated Feature} &
\textbf{Replacement}}
\newcommand\tabuheader{\textbf{Example Name} & \textbf{Earlier Version} &
\textbf{Feature Updated}}
\newcommand\dpftable[1]{
\renewcommand{\arraystretch}{1.0}
\tablefirsthead{%
\hline\\[-2ex]
\tabuheader\\[2pt]
\hline\\[-2ex]
}
\tablehead{%
\tabpcont{from previous}\\[2pt]
\hline\\[-2ex]
\tabuheader\\[2pt]
\hline\\[-2ex]
}
\tabletail{%
\hline\\[-2.5ex]
\tabpcont{on next}\\
}
\tablelasttail{\hline\\[-1ex]}
\tablecaption{Updated Examples for Features Deprecated in Version #1\label{tab:Updated Examples #1}}
}
Deprecation of features began in OpenMP 5.0.
Examples that use a deprecated feature have been updated with an equivalent
replacement feature.
Table~\ref{tab:Deprecated Features} summarizes deprecated features and
their replacements in each version. Affected examples are updated
accordingly and listed in Section~\ref{sec:Updated Examples}.
\nolinenumbers
\renewcommand{\arraystretch}{1.4}
\tablefirsthead{%
\hline
\tabpheader\\
\hline\\[-3.5ex]
}
\tablehead{%
\tabpcont{from previous}\\
\hline
\tabpheader\\
\hline\\[-3ex]
}
\tabletail{%
\hline\\[-4ex]
\tabpcont{on next}\\
}
\tablelasttail{\hline\\[-2ex]}
\tablecaption{Deprecated Features and Their Replacements\label{tab:Deprecated Features}}
\begin{supertabular}{p{0.4in} p{2.3in} p{2.2in}}
6.0 & \kcode{declare reduction(}\plc{reduction-id}: \plc{typename-list}: \plc{combiner}\kcode{)}
& \kcode{declare reduction(}\plc{reduction-id}: \plc{typename-list}\kcode{)} \kcode{combiner(\plc{combiner-exp})} \\
\hline
5.2 & \kcode{default} clause on metadirectives
& \kcode{otherwise} clause \\
5.2 & delimited \kcode{declare target} directive for C/C++
& \kcode{begin declare target} directive \\
5.2 & \kcode{to} clause on \kcode{declare target} directive
& \kcode{enter} clause \\
5.2 & non-argument \kcode{destroy} clause on \kcode{depobj} construct
& \kcode{destroy(\plc{argument})} \\
5.2 & \kcode{allocate} directive for Fortran \bcode{ALLOCATE} statements
& \kcode{allocators} directive \\
5.2 & \kcode{depend} clause on \kcode{ordered} construct
& \kcode{doacross} clause \\
5.2 & \kcode{linear(\plc{modifier(list): linear-step})} clause
& \kcode{linear(\plc{list:} step(\plc{linear-step})\plc{, modifier})} clause \\
\hline
5.1 & \kcode{master} construct
& \kcode{masked} construct \\
5.1 & \kcode{master} affinity policy
& \kcode{primary} affinity policy \\
\hline
5.0 & \kcode{omp_lock_hint_*} constants
& \kcode{omp_sync_hint_*} constants \\[2pt]
\end{supertabular}
\linenumbers
These replacements appear in examples that illustrate, otherwise, earlier features.
When using a compiler that is compliant with a version prior to
the indicated version, the earlier form of an example for a previous
version is listed as a reference.
\newpage
\section{Updated Examples for Different Versions}
\label{sec:Updated Examples}
The following tables list the updated examples for different versions as
a result of feature deprecation. The \emph{Earlier Version} column of
the tables shows the version tag of the earlier version. It also shows
the prior name of an example when it has been renamed.
Table~\ref{tab:Updated Examples 6.0} lists the updated examples for
features deprecated in OpenMP 6.0
in the Examples Document Version
\href{https://github.com/OpenMP/Examples/tree/v6.0}{6.0}.
The \emph{Earlier Version} column of the table lists the earlier version
tags of the examples that can be found in
the Examples Document Version
\href{https://github.com/OpenMP/Examples/tree/v5.2}{5.2}.
\index{clauses!combiner@\kcode{combiner}}
\index{combiner clause@\kcode{combiner} clause}
\nolinenumbers
\dpftable{6.0}
\begin{supertabular}{p{1.7in} p{1.1in} p{2.2in}}
\hexentry{udr.1}[f90]{4.0} &
\plc{combiner} expression in \kcode{declare} \\
\hexentry{udr.2}[f90]{4.0} &
\kcode{reduction} directive changed to use \\
\hexentry{udr.3}[f90]{4.0} & \kcode{combiner} clause \\
\hexentry[f90]{udr.4}{4.0} & \\
\hexentry[cpp]{udr.5}{4.0} & \\
\hexentry[cpp]{udr.6}{4.0} & \\[2pt]
\end{supertabular}
\linenumbers
Table~\ref{tab:Updated Examples 5.2} lists the updated examples for
features deprecated in OpenMP 5.2
in the Examples Document Version \examplesref{5.2}.
The \emph{Earlier Version} column of the table lists the earlier version
tags of the examples that can be found in
the Examples Document Version \examplesref{5.1}.
\index{clauses!default@\kcode{default}}
\index{clauses!otherwise@\kcode{otherwise}}
\index{clauses!to@\kcode{to}}
\index{clauses!enter@\kcode{enter}}
\index{clauses!depend@\kcode{depend}}
\index{clauses!doacross@\kcode{doacross}}
\index{clauses!linear@\kcode{linear}}
\index{clauses!destroy@\kcode{destroy}}
\index{default clause@\kcode{default} clause}
\index{otherwise clause@\kcode{otherwise} clause}
\index{to clause@\kcode{to} clause}
\index{enter clause@\kcode{enter} clause}
\index{depend clause@\kcode{depend} clause}
\index{doacross clause@\kcode{doacross} clause}
\index{linear clause@\kcode{linear} clause}
\index{destroy clause@\kcode{destroy} clause}
\index{directives!begin declare target@\kcode{begin declare target}}
\index{begin declare target directive@\kcode{begin declare target} directive}
\index{allocate directive@\kcode{allocate} directive}
\index{allocators directive@\kcode{allocators} directive}
\nolinenumbers
\dpftable{5.2}
\begin{supertabular}{p{1.7in} p{1.2in} p{2.1in}}
\hexentry{error.1}[f90]{5.1} &
\kcode{default} clause on metadirectives \\
\hexentry{metadirective.1}[f90]{5.0} &
replaced with \kcode{otherwise} clause \\
\hexentry{metadirective.2}[f90]{5.0} & \\
\hexentry{metadirective.3}[f90]{5.0} & \\
\hexentry{metadirective.4}[f90]{5.1} & \\
\hexentry{target_ptr_map.4}{5.1} & \\
\hexentry{target_ptr_map.5}[f90]{5.1} & \\[2pt]
\hline\\[-2ex]
\hexentry[f90]{array_shaping.1}{5.0} &
\kcode{to} clause on \kcode{declare target} \\
\hexentry{target_reverse_offload.7}{5.0} &
directive replaced with \kcode{enter} clause \\
\hexentry{target_task_reduction.1}[f90]{5.1} & \\
\hexentry{target_task_reduction.2a}[f90]{5.0} & \\
\hexentry{target_task_reduction.2b}[f90]{5.1} &\\[2pt]
\hline\\[-2ex]
\hexentry{array_shaping.1}{5.0} &
delimited \kcode{declare target} \\
\hexentry{async_target.1}{4.0} &
directive replaced with \\
\hexentry{async_target.2}{4.0} &
\kcode{begin declare target} \\
\hexentry{declare_target.1}{4.0} &
directive for C/C++ \\
\hexentry[cpp]{declare_target.2c}{4.0} & \\
\hexentry{declare_target.3}{4.0} & \\
\hexentry{declare_target.4}{4.0} & \\
\hexentry{declare_target.5}{4.0} & \\
\hexentry{declare_target.6}{4.0} & \\
\hexentry{declare_variant.1}{5.0} & \\
\hexentry{device.1}{4.0} & \\
\hexentry{metadirective.3}{5.0} & \\
\hexentry{target_ptr_map.2}{5.0} & \\
\hexentry{target_ptr_map.3a}{5.0} & \\
\hexentry{target_ptr_map.3b}{5.0} & \\
\hexentry{target_struct_map.1}{5.0} & \\
\hexentry[cpp]{target_struct_map.2}{5.0} & \\
\hexentry{target_struct_map.3}{5.0} & \\
\hexentry{target_struct_map.4}{5.0} & \\[2pt]
\hline\\[-2ex]
\hexentry{doacross.1}[f90]{4.5} &
\kcode{depend} clause on \kcode{ordered} \\
\hexentry{doacross.2}[f90]{4.5} &
construct replaced with \kcode{doacross} \\
\hexentry{doacross.3}[f90]{4.5} &
clause \\
\hexentry{doacross.4}[f90]{4.5} & \\[2pt]
\hline\\[-2ex]
\hexentry[cpp]{linear_modifier.1}[f90]{4.5} &
modifier syntax change for \kcode{linear} \\
\hexentry[cpp]{linear_modifier.2}[f90]{4.5} &
clause on \kcode{declare simd} directive \\
\hexentry{linear_modifier.3}[f90]{4.5} & \\[2pt]
\hline\\[-2ex]
\hexentry[f90]{allocators.1}{5.0} &
\kcode{allocate} directive replaced with \kcode{allocators} directive
for Fortran \bcode{allocate} statements \\[2pt]
\hline\\[-2ex]
\hexentry{depobj.1}[f90]{5.0} &
argument added to \kcode{destroy} clause on \kcode{depobj}
construct \\[2pt]
\end{supertabular}
\linenumbers
\newpage
Table~\ref{tab:Updated Examples 5.1} lists the updated examples for
features deprecated in OpenMP 5.1
in the Examples Document Version \examplesref{5.1}.
The \emph{Earlier Version} column of the table lists the earlier version
tags and prior names of the examples that can be found in
the Examples Document Version \examplesref{5.0.1}.
\index{affinity!master policy@\kcode{master} policy}
\index{affinity!primary policy@\kcode{primary} policy}
\index{constructs!master@\kcode{master}}
\index{constructs!masked@\kcode{masked}}
\index{master construct@\kcode{master} construct}
\index{masked construct@\kcode{masked} construct}
\nolinenumbers
\dpftable{5.1}
\begin{supertabular}{p{1.8in} p{1.4in} p{1.8in}}
\hexentry{affinity.5}[f]{4.0} &
\kcode{master} affinity policy replaced with \kcode{primary} policy \\[2pt]
\hline\\[-2ex]
\hexentry{async_target.3}[f90]{5.0} &
\kcode{master} construct replaced \\
\hexentry{cancellation.2}[f90]{4.0} &
with \kcode{masked} construct \\
\hexentry{copyprivate.2}[f]{3.0} & \\
\hexentry[f]{fort_sa_private.5}{3.0} & \\
\hexentry{lock_owner.1}[f]{3.0} & \\
\hexmentry{masked.1}[f]{3.0}{master.1} & \\
\hexmentry{parallel_masked_taskloop.1}[f90]{5.0}{parallel_master_taskloop.1} &\\
\hexentry{reduction.6}[f]{3.0} & \\
\hexentry{target_task_reduction.1}[f90]{5.0} & \\
\hexentry{target_task_reduction.2b}[f90]{5.0} & \\
\hexentry{taskloop_simd_reduction.1}[f90]{5.0} & \\
\hexentry{task_detach.1}[f90]{5.0} & \\[2pt]
\end{supertabular}
\linenumbers
Table~\ref{tab:Updated Examples 5.0} lists the updated examples for
features deprecated in OpenMP 5.0
in the Examples Document Version \examplesref{5.1}.
The \emph{Earlier Version} column of the table lists the earlier version
tags of the examples that can be found in
the Examples Document Version \examplesref{5.0.1}.
\nolinenumbers
\dpftable{5.0}
\begin{supertabular}{p{1.6in} p{1.3in} p{2.1in}}
\hexentry{critical.2}[f]{4.5} &
\kcode{omp_lock_hint_*} constants \\
\hexentry[cpp]{init_lock_with_hint.1}[f]{4.5} &
replaced with \kcode{omp_sync_hint_*} constants \\[2pt]
\end{supertabular}
\linenumbers