Is it possible to individually chose the language in which blocks are generated for a Simulink model
1 次查看(过去 30 天)
显示 更早的评论
I have a simulink model with bunch of blocks I want to autocode this system but want to control the language of the source code. For example suppose I have 2 blocks A and B. I want to auto-code in such a way that Block A gets autocoded in C++ and block B gets auto coded in CUDA. Is this functionality supported.
The reason I am trying to do this is I have a model with with some custom blocks that need to be auto coded into CUDA code but this model also has a Nvidia TCP block that is also getting auto-coded into CUDA rather than C++ code. This behaviour is completely breaking my autocode. So if there is a fix to this problem that would be great.
0 个评论
回答(1 个)
Asim
2023-9-30
Hello @Ishan Banerjee
I understand that in your Simulink model, you want some of your blocks to generate code in C++ while the other blocks to generate code in CUDA. Unfortunately, Simulink does not support generating code in different languages for different blocks within the same model.
The code generation process in Simulink is typically language-agnostic at the block level. Code generation is limited to generating code for the entire model in a single language, and this language is determined by the configuration parameters set for the model.
I hope this information helped in clarifying your query.
Thanks,
Asim Asrar
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!