Simulink Coder - pass by reference

Heya! I have a question regarding code generation from Simulink Coder:
Within one big Simulink model, does Simulink Coder allow you to pass a large frame of data from one signal processing routine to another signal processing routine using a pointer? If so, how?
I ask because I've got a large simulink model in which multiple signal processing algorithms perform mathematical operations on the same frame of data in a sequential manner - so for efficient C code it would make sense for one signal processing routine to pass a pointer reference to the data to the next signal processing routine.
Thanks!

Respuestas (1)

Kaustubha Govind
Kaustubha Govind el 20 de Nov. de 2012

0 votos

Do you mean that each block should perform "in-place" operations? In other words, the output signal reuses the same memory location as the input signal? If so, I think Simulink Coder already tries to do this if Reuse block outputs is enabled on the Configuration Parameters window. However, blocks can opt out of this. For example, an S-function can use ssSetInputPortOverWritable to specify that an input signal buffer can be reused.

Categorías

Más información sobre Simulink Coder en Centro de ayuda y File Exchange.

Productos

Preguntada:

el 20 de Nov. de 2012

Community Treasure Hunt

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

Start Hunting!

Translated by