OpenMP-Examples/synchronization/init_lock_with_hint.tex
2021-08-17 09:11:55 -07:00

11 lines
441 B
TeX

%\pagebreak
\subsection{\code{omp\_init\_lock\_with\_hint} Routine}
\label{subsec:init_lock_with_hint}
The following example demonstrates how to initialize an array of locks in a \code{parallel} region by using \code{omp\_init\_lock\_with\_hint}.
Note, hints are combined with an \code{|} or \code{+} operator in C/C++ and a \code{+} operator in Fortran.
\cppexample[4.5]{init_lock_with_hint}{1}
\fexample[4.5]{init_lock_with_hint}{1}[1]