Enable OpenMP library if possible
Parallelization of parfor
-loops
Description
App Configuration Pane: Speed
Configuration Objects: coder.MexCodeConfig
| coder.CodeConfig
| coder.EmbeddedCodeConfig
The Enable OpenMP library if possible enables the OpenMP library,
if possible. Using the OpenMP library, the C/C++ code that the code generator produces
for parfor
-loops can run on multiple
threads. With OpenMP disabled, the code generator treats parfor
-loops
as for
-loops and generates C/C++ code that runs on a single
thread.
Use of the OpenMP library is not compatible with just-in-time (JIT) compilation. If
the Use JIT compilation
for build type of MEX check box is selected, , the code generator uses
JIT compilation and treats parfor
-loops as
for
-loops, even if the Enable OpenMP library
if possible check box is selected.
When using GPU Coder™, the code generator always treats
parfor
-loops as for
-loops.
Settings
- On
If possible, the code generator uses the OpenMP library to produce loop iterations that run in parallel. This value is the default value.
- Off
The code generator treats
parfor
-loops asfor
-loops.
Programmatic Use
Property:
EnableOpenMP |
Values: true |
false |
Default: true |
Version History
Introduced in R2013b
See Also
coder.MexCodeConfig
| coder.CodeConfig
| coder.EmbeddedCodeConfig
| parfor