Main Content

Array Layout

Column-major and row-major order for array storage

Array layout refers to the order in which array elements are stored in memory. By default, MATLAB® Coder™ generates code that uses column-major layout. You can also generate code that uses row-major. Row-major layout can improve performance for certain algorithms and ease integration with external code or data that uses row-major. Linear indexing operations always use column-major layout in generated code.

Functions

coder.cevalCall C/C++ function from generated code
coder.columnMajorSpecify column-major array layout for a function or class
coder.isColumnMajorDetermine whether the current function or variable uses column-major layout
coder.isRowMajorDetermine whether the current function or variable uses row-major layout
coder.rowMajorSpecify row-major array layout for a function or class

Classes

coder.CodeConfigConfiguration parameters for C/C++ code generation from MATLAB code
coder.MexCodeConfigConfiguration parameters for MEX function generation from MATLAB code
coder.EmbeddedCodeConfigConfiguration parameters for C/C++ code generation from MATLAB code with Embedded Coder

Topics