Specify the layout of array data for code generation as column-major or row-major.
Category: Code Generation > Interface
Default:
Column-major
Column-major
Generate code in column-major array layout. For example, consider
matrix A
, which is a 4x3
matrix:
A = 1 2 3 4 5 6 7 8 9 10 11 12
A
is represented in the generated code
as:1 4 7 10 2 5 8 11 3 6 9 12
Row-major
Generate code in row-major array layout. For example, for matrix
A
, in row-major array layout, the elements of the
rows are contiguous. A
is represented in the
generated code
as:
1 2 3 4 5 6 7 8 9 10 11 12
Select parameter Use algorithms optimized for row-major array layout to enable efficient row-major algorithms.
Parameter:
ArrayLayout |
Type: character vector |
Value:
'Column-major' | 'Row-major' |
Default:
'Column-major' |
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | No impact |
Safety precaution | No impact |