\section{\kcode{linear} Clause in Loop Constructs}
\label{sec:linear_in_loop}
\index{clauses!linear@\kcode{linear}}
\index{linear clause@\kcode{linear} clause}

The following example shows the use of the \kcode{linear} clause in a worksharing-loop 
construct to allow the proper parallelization of a loop that contains 
an induction variable (\ucode{j}).  At the end of the execution of 
the worksharing-loop construct, the original variable \ucode{j} is updated with 
the value \ucode{N/2} from the last iteration of the loop.

\cexample[4.5]{linear_in_loop}{1}

\ffreeexample[4.5]{linear_in_loop}{1}

