Main Content

Optimize reductions

Generate SIMD code for reduction operations | Parallelize for-loops performing reduction operations

Since R2022a

Description

App Configuration Pane: Speed

Configuration Objects: coder.MexCodeConfig | coder.CodeConfig | coder.EmbeddedCodeConfig

To generate SIMD code for reduction operations.

ValueDescription
false

This value is the default value.

Code generator does not generate SIMD code for reduction operations.

true

To use this parameter, you must select an instruction set for the InstructionSetExtensions parameter. The code generator uses the specified instruction set to generate SIMD code for reduction operations.

See Generate SIMD Code from MATLAB Functions for Intel Platforms.

To generate parallel for-loops performing reduction operations, use one of the values as specified in this table.

ValueDescription
false

This value is the default value.

Code generator does not automatically parallelize for-loops performing reduction operations.

true

The code generator automatically parallelizes for-loops performing reduction operations in the generated code, only if you set EnableAutoParallelization to true.

See Reduction Operations Supported for Automatic Parallelization of for-loops.

Note

Vectorizing and parallelizing reduction operations might introduce slight numerical deviations. For more information, see Handling Overflow in Automatic Parallelization of for-loops.

Settings

Off

This value is the default value.

On

Programmatic Use

Property: OptimizeReductions
Values: 'false' | 'true'
Default: 'false'

Version History

Introduced in R2022a