Simplify array indexing
Replace multiply operations in array indices when accessing arrays in a loop
Model Configuration Pane: Code Generation / Optimization
The Simplify array indexing parameter instructs the code generator whether to replace multiply operations in array indices when accessing arrays in a loop.
off(default) | on
In array indices, replace multiply operations with add operations when accessing arrays in a loop in the generated code. When the original signal is multidimensional, the Embedded Coder® generates one-dimensional arrays, resulting in multiply operations in the array indices. Using this setting eliminates costly multiply operations when accessing arrays in a loop in the C/C++ program. This optimization (commonly referred to as strength reduction) is particularly useful if the C/C++ compiler on the target platform does not have similar functionality. The absence of multiply operations in the C/C++ program does not imply that the C/C++ compiler does not generate multiply instructions.
Leave multiply operations in array indices when accessing arrays in a loop.
|Safety precaution||No impact|
|Type: character vector|
Introduced in R2009a