Reuse output buffers of Model blocks
Reuse referenced model buffers if possible
Since R2022b
Model Configuration Pane: Code Generation / Optimization
Description
Specify whether to reuse referenced model output buffers whenever possible.
Dependencies
The Reuse output buffers of Model blocks optimization has these dependencies:
The Signal storage reuse parameter enables the parameter.
The optimization is enabled only when the top model and the model referenced by a Model block have the Reuse output buffers of Model blocks parameter enabled.
Settings
on
(default) | off
- On
When you enable the parameter for both the top model and the model referenced by a Model block, the code generator analyzes referenced model contents to determine if buffer reuse is possible. If buffer reuse is possible, it reuses signal memory or generates reusable temporary buffers to hold referenced model outputs, which can significantly reduce RAM consumption. This optimization does not work when function prototype control is applied to the referenced models.
- Off
Referenced model outputs are stored in unique locations.
Recommended Settings
Application | Setting |
---|---|
Debugging | Off |
Traceability | Off |
Efficiency | On |
Safety precaution | No impact |
Programmatic Use
Parameter:
ReuseModelBlockBuffer
|
Type: character vector |
Value: 'on' | 'off' |
Default:'on'
|
Version History
Introduced in R2022b