How to prevent Matlab Coder from declaring locals as statics?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
keith russell
am 27 Apr. 2017
Beantwortet: Ryan Livingston
am 1 Mai 2017
Matlab Coder sometimes marks certain local arrays as static. Although this of course saves time in stack setup, it makes the whole function thread-unsafe. How do we suppress this optimization?
(I apologize - I lost my example code.)
0 Kommentare
Akzeptierte Antwort
Ryan Livingston
am 1 Mai 2017
You can enable the MultiInstanceCode configuration setting:
That will instead "spill" the statics to a heap-allocated structure that must be passed in when calling the generated entry-point functions. The doc page:
is the main landing page for that topic and includes links to other pages showing how to call the generated code with this setting enabled.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!