Main Content

性能

有关提高所生成代码的性能的规范

在设计用于代码生成的 MATLAB® 算法时,请遵循以下规范来提高生成代码的性能。

模块

MATLAB FunctionSimulink 模型中包含 MATLAB 代码

函数

coder.areUnboundedVariableSizedArraysSupportedCheck if current configuration settings allow unbounded variable-size arrays (自 R2024a 起)
coder.inline控制生成代码中当前函数的内联
coder.inlineCallInline called function in generated code (自 R2024a 起)
coder.nonInlineCallPrevent inlining of called function in generated code (自 R2024a 起)
coder.unroll通过为每次循环迭代生成循环体的副本来展开 for 循环
coder.const在生成的代码中将表达式折叠为常量

主题