Will codegen accelerate sub-functions?

2 ビュー (過去 30 日間)
Xingwang Yong
Xingwang Yong 2021 年 4 月 27 日
回答済み: Bruno Luong 2021 年 4 月 27 日
I have functions look like
% main.m
function main()
for i
fun1();
end
% fun1.m
function fun1()
for j
fun2()
end
If I use matlab coder to generate a mex file for main.m, would the for-loop in fun1.m get accelerated too?
Or do I have to generate fun1_mex for fun1.m, and then use coder.ceval() in the main.m, at last generate mex for main.m?

採用された回答

Bruno Luong
Bruno Luong 2021 年 4 月 27 日
Yes coder translates the sub-functions to C as well.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB Coder についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by