Why does my code inline an Embedded MATLAB function even when I include a function call to eml.inline('never') in Real-Time Workshop 7.4 (R2009b)?

조회 수: 3 (최근 30일)
I have written an Embedded MATLAB (EML) function
%#eml
function y = noinline1(x)
assert(all(size(x) == [10,10]));
y = subfcn(x);
function y = subfcn(x)
eml.inline('never');
y = x;
and then I compile the code using
emlc noinline1 -o noinline1x -report
Even though I specified it to not be inlined, it appears that it has been.

채택된 답변

MathWorks Support Team
MathWorks Support Team 2010년 1월 18일
This is expected behavior for Real-Time Workshop 7.4 (R2009b).
The reason for this behavior is that subfunction was optimized out and the code was able to eliminate the function call.
Two possible optimizations which could have this effect include calls to the identity function, or calls to functions that always return the same constant value.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Deployment, Integration, and Supported Hardware에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

제품


릴리스

R2009b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by