Matlab coder difference between 2016a to 2018b

2 ビュー (過去 30 日間)
josh mosh
josh mosh 2019 年 2 月 20 日
コメント済み: Sumit Ghosh 2019 年 2 月 20 日
Hi,
we have a relative big .m file which we generate C code from it,
recently we try to move to 2018b but the generated C code got alot more allocated memory then before,
without touching the .m code (just changing to 2018b)
and running the same build script,
in 2018b we get alot more redundant memory allocation like this:
myHugeStruct data; // few giga of memory
.
.
.
someInnerStruct f_data[1500]; //1 inner struct of 'myHugeStruct'
for (nRes=0;nRes<1500;nRes++){
f_data[nRes] = data->someInnerStruct[nRes];
}
somefunction(f_data);
in 2016a it was simply this:
myHugeStruct data; // few giga of memory
.
.
.
somefunction(data->someInnerStruct);
what can make such changes? too much memory allocations like that make us crush now,
maybe a new compilation flag that i need to turn off?
thanks
  1 件のコメント
Sumit Ghosh
Sumit Ghosh 2019 年 2 月 20 日
Hi Josh,
This looks like an unintended regression.
Just out of curiosity, have you used the pattern
x = foo(x)
in your matlab code. If so, you could try updating the code to use
x.a = foo(x.a)
and see the generated code.
In any case, this looks like an interesting problem to investigate, and you can contact tech support giving reproduction steps for the issue.
https://www.mathworks.com/support/contact_us.html
Thanks.

サインインしてコメントする。

回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by