Why is there an inefficient loop generated in the initialization function of generated code in Real-Time Workshop 6.0 (R14)?

In generated code, a block's DWork vectors are usually set to zero in the initialization function. The set to zero operations are always done using a for loop even if the widths of the DWork vectors are less than the specified roll threshold.

 採用された回答

MathWorks Support Team
MathWorks Support Team 2009 年 6 月 27 日
This has been fixed in Real-Time Workshop 6.1 (R14SP1). In Real-Time Workshop 6.1 (R14SP1), the loop is only used when the width of the DWork vector is not less than roll threshold. If you are using a previous version, read the following:
This has been verified as a bug in Real-Time Workshop 6.0 (R14) in the way that it handles generating initialization function code.
There are currently no known workarounds.

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSimulink Coder についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by