MATLAB Answers

Translated by

このページのコンテンツは英語から自動翻訳されています。自動翻訳をオフにする場合は「<a class="turn_off_mt" href="#">ここ</a>」をクリックしてください。

josh mosh
0

Matlab coder difference between 2016a to 2018b

josh mosh
さんによって質問されました 2019 年 2 月 20 日 13:23
最新アクティビティ Sumit Ghosh さんによって コメントされました 2019 年 2 月 20 日 16:31
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 2019 年 2 月 20 日 16:31
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.

サインイン to comment.

0 件の回答


Translated by