库开发
开发代码替换库
了解什么是代码替换自定义,为什么要替换,替换什么以及有哪些限制。熟悉开发代码替换库的过程。使用代码替换工具以交互方式开发库或以编程方式开发库。使用 Quick Start Library Development了解开发过程和工具。
工具
函数
主题
快速入门
- What Is Code Replacement Customization?
Customize how and when the code generator replaces C/C++ code that it generates for functions and operators. - Code You Can Replace from MATLAB Code
Review lists of functions and operators the code generator can replace depending on the code replacement library that you specify. - Quick Start Library Development
Develop a code replacement library that includes an entry for generating replacement code for a math function.
开发代码替换库的工作流
实现更多控制的选项
- Data Alignment for Code Replacement
Define code replacement mappings that align data for a replacement function to a specified boundary. - Array Layout and Code Replacement
Define code replacement mappings that specify data layout for storing array elements in memory. - Allow Shape Agnostic Match
Shape-agnostic matrix replacement for Embedded Coder CRL. - Reserved Identifiers and Code Replacement
C/C++ programming language reserved keywords as identifiers and function names in code replacement entries. - Remap Operator Output to Function Input
Meet specific generated code patterns by remapping operator outputs to input positions in your replacement function argument list. - Customize Match and Replacement Process
Add logic to the code replacement match and replacement process for functions or operators.
疑难解答
Troubleshoot Code Replacement Library Registration
If a code replacement library is not listed as a configuration option or does not appear in the Code Replacement Viewer, troubleshoot the library registration.
Troubleshoot Code Replacement Misses
Use miss reason messages that appear in the Code Replacement Viewer to analyze and correct code replacement misses.