Loop unrolling threshold - Threshold on the number of iterations that determines whether to automatically
unroll a for-loop and a parfor-loop - MATLAB ([original](http://www.mathworks.com/help/coder/ref/loopunrollingthreshold.html)) ([raw](?raw))
Main Content
Threshold on the number of iterations that determines whether to automatically unroll a for
-loop and a parfor
-loop
Description
App Configuration Pane: Speed
Configuration Objects: coder.CodeConfig | coder.EmbeddedCodeConfig
Specify a number of iterations to instruct the code generator whether to automatically unroll a for
-loop. Loops with fewer iterations than this threshold are candidates for automatic unrolling by the code generator. This threshold applies to allfor
-loops and parfor
-loops in your MATLABĀ® code. For an individual for
-loop, a coder.unroll directive placed immediately before the loop takes precedence over the loop unrolling optimization. The threshold can also apply to somefor
-loops produced during code generation.
Settings
5
| positive integer
Threshold above which a loop is a candidate for unrolling by the code generator. The default is 5
.
Programmatic Use
**Property:**LoopUnrollThreshold |
---|
Values: 5 | positive integer |
Default: 5 |
Version History
Introduced in R2018b