Passing constant struct to entry point in Matlab Coder
古いコメントを表示
I am trying to prevent code generation for unused execution paths. The system I am trying to compile to C with Matlab Coder is parametrized with a nested params struct, which also includes the switches for the execution paths I am trying to exclude. A simple solution would be declaring the whole nested parameter struct as constant, like this
codegen systemCode -args {1, coder.Constant(params)}
but this does not seem to have any effect. It seems the params struct is still treated as a non-constant. I'm looking for a solution to this problem that does not involve pulling the control path switches out of the params struct.
4 件のコメント
Ryan Livingston
2015 年 7 月 13 日
If you could post a self-contained reproduction example, that would be helpful. When I tried with a small example, the unnecessary branches were pruned.
Ludger Solbach
2015 年 7 月 13 日
Ludger Solbach
2015 年 7 月 13 日
Ludger Solbach
2015 年 7 月 13 日
編集済み: Ludger Solbach
2015 年 7 月 13 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Algorithm Design Basics についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!