Main Content

이 번역 페이지는 최신 내용을 담고 있지 않습니다. 최신 내용을 영문으로 보려면 여기를 클릭하십시오.

성능

생성된 코드 성능 향상을 위한 지침

블록

MATLAB FunctionInclude MATLAB code in models that generate embeddable C code

함수

coder.inlineControl inlining of a specific function in generated code
coder.unrollUnroll for-loop by making a copy of the loop body for each loop iteration
coder.constFold expressions into constants in generated code

예제 및 방법

Unroll for-Loops

Control loop unrolling.

Inline Code

Inlining eliminates the overhead of a function call by replacing the function call with the body of the function.

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.