coder.loop.parallelize
Parallelize specific for
loops in generated code; disable
automatic parallelization
Since R2021a
Syntax
Description
coder.loop.parallelize('never')
disables automatic parallelization
of the for
loop placed immediately after it. This pragma overrides the
EnableAutoParallelization
configuration setting.
This pragma supports explicit for
loops only. For more information on
explicit and implicit loops, see Parallelize Implicit for Loops.
coder.loop.parallelize("
parallelizes
the loopID
")for
-loop whose index name is loopID
.
This prompts the generated code for that loop to execute the iterations in parallel with
the threads available for your target. This transforms requires
EnableOpenMP
to be set to true
in your code
configuration object.
For more information about loop optimizations, see Optimize Loops in Generated Code.
creates a loop control object with loopObj
= coder.loop.parallelize(___)transformSchedule
property set to
coder.loop.parallelize
. Use the apply
method to
apply the transform to the specified loop.
Examples
Input Arguments
Output Arguments
Extended Capabilities
Version History
Introduced in R2021a