이 페이지는 기계 번역을 사용하여 번역되었습니다. 영어 원문을 보려면 여기를 클릭하십시오.
성능
코드 생성에 사용할 MATLAB® 알고리즘을 설계할 경우 생성된 코드의 성능을 개선하려면 다음 지침을 따릅니다.
블록
MATLAB Function | Include MATLAB code in Simulink models |
함수
coder.areUnboundedVariableSizedArraysSupported | Check if current configuration settings allow unbounded variable-size arrays (R2024a 이후) |
coder.inline | Control inlining of current function in generated code |
coder.inlineCall | Inline called function in generated code (R2024a 이후) |
coder.nonInlineCall | Prevent inlining of called function in generated code (R2024a 이후) |
coder.unroll | Unroll for -loop by making a copy of
the loop body for each loop iteration |
coder.const | Fold expressions into constants in generated code |
도움말 항목
- Unroll for-Loops and parfor-Loops
Control loop unrolling.
- 코드를 인라인으로 처리하기
인라인 처리는 함수 호출을 함수 본문으로 대체하기 때문에 함수 호출 오버헤드가 발생하지 않습니다.
- Avoid Data Copies of Function Inputs in Generated Code
Generate code that passes input arguments by reference.
- Generate Reusable Code
To reuse functions, save them in files or integrate external functions into generated code.
- Control Run-Time Checks
Improve performance by disabling run-time checks.
- LAPACK Calls for Linear Algebra in a MATLAB Function Block
LAPACK function calls improve the simulation speed of MATLAB Function block algorithms that call certain linear algebra functions.
- BLAS Calls for Matrix Operations in a MATLAB Function Block
BLAS function calls improve the simulation speed of MATLAB Function block algorithms that call certain low-level vector and matrix functions.
- FFTW calls for fast Fourier transform functions in a MATLAB Function Block
FFTW function calls improve the simulation speed of MATLAB Function block algorithms that call MATLAB fast Fourier transform (FFT) functions.