Determine whether the current function or variable uses column-major layout
coder.isColumnMajor
resolves as true in the generated code if
the current function uses column-major array layout. Use the function as the
expression in control flow (if
, else
,
switch
) statements.
You cannot query the array layout of a structure field or property.
The code generator uses column-major layout by default.
Outside of code generation and simulation,
coder.isColumnMajor
is
always true.
If coder.isColumnMajor
always resolves to true for your code, other
branches in the if
statement are ignored by the code
generator. Otherwise, one instance of the current function is created for each
array layout.
coder.ceval
| coder.columnMajor
| coder.isRowMajor
| coder.rowMajor