表现
Execution time profiling, memory usage profiling, optimized code
当您准备生成生产代码,提高性能,使用配置选项和高级优化时。您可以使用选项和优化MATLAB®CODER™产品文档。与嵌入式编码器®,您还可以使用执行时间分析和内存使用分析来分析性能。
使用执行时间分析到:
确定生成的代码是否符合硬件的实时要求。
确定需要改进性能的代码部分。
The static code metrics report includes metrics on files, global variables, and functions. The static code metrics report helps you to determine which global variables and function call paths affect performance.To determine the size of stack memory that is required to run generated code, you can run a software-in-the-loop (SIL) and processor-in-the-loop (PIL) execution that generates a stack usage profile.
功能
对象
话题
Execution Time Profiling
- SIL和PIL的执行时间分析
Why measure execution times for code generated from entry-point functions. - 生成执行时间配置文件
启用对循环(SIL)或处理器的执行时间分析(PIL)执行。 - 查看执行时间
Open the code execution profiling report generated by a SIL or PIL execution. - 一个nalyze Execution Time Data
使用行命令分析SIL或PIL执行的执行时间测量。
Memory Usage Profiling
- Generating a Static Code Metrics Report for Code Generated from MATLAB Code
创建并探索示例静态代码指标报告。 - 静态代码指标
The code generator performs static analysis of the generated C or C++ code and provides these metrics in the static code metrics report in the code generation report. - MATLAB代码生成的代码的堆栈使用分析
确定运行生成代码所需的堆栈内存的大小。 - Removal of Unused Class Properties in the Generated C/C++ Code
删除生成的C/C ++代码中未使用的类属性或结构字段。
执行速度
- 简化乘法以在循环中的数组索引
Replace multiply operations with add operations in array indexing in loops in C/C++ code generated from MATLAB code. - 生成MATLAB功能的SIMD代码
使用Intel SSE和Intel AVX技术提高生成代码的执行速度。