Default function array layout
Default input array data for custom code functions
Model Configuration Pane: Simulation Target
Description
The Default function array layout parameter specifies how input array data is handled by external C/C++ functions and class methods. This parameter affects C/C++ functions and methods called by C Caller, C Function, MATLAB Function, and MATLAB System blocks and Stateflow® charts.
Settings
Column-majorExternal C/C++ functions and class methods assume input array data is in column-major layout.
Row-majorExternal C/C++ functions and class methods assume input array data is in row-major layout.
AnyExternal C/C++ functions and class methods are indifferent about input data array layout. If your external function and class method algorithms do not require the matrix data to be in a specific array layout, for example if they perform only element-wise operations on input array data, use this option.
Not specifiedExternal C/C++ functions and class methods make no assumption about input data array layout. However, if Array layout (Simulink Coder) is set to
Row-major, Simulink® reports an error. You can turn off the error by changing the External functions compatibility for row-major code generation (Simulink Coder) towarningornone.
The Default function array layout parameter controls the default array layout of custom code functions and class methods. To specify array layout for individual functions or class methods, click Exception by function.
Recommended Settings
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No recommendation |
| Safety precaution | No recommendation |
Programmatic Use
Parameter: DefaultCustomCodeFunctionArrayLayout |
| Type: character vector |
Value: "Column-major" | "Row-major" | "Any" | "NotSpecified" |
Default: "NotSpecified" |
Version History
Introduced in R2020b