Main Content

Use signal labels to guide buffer reuse

Reuse buffers by using signal labels

Model Configuration Pane: Code Generation / Optimization

Description

The Use signal labels to guide buffer reuse parameter instructs the code generator to use the same signal memory for signals with the same label.

Settings

off (default) | on
On

The code generator uses signal labels as a guide for which buffers to reuse.

Off

The code generator ignores signal labels when implementing buffer reuse.

Tips

If your model has the optimal parameter settings for removing data copies, you might be able to remove additional data copies by using signal labels. After studying the generated code and the Static Code Metrics Report and identifying blocks for whose input and output signals you would like to reuse, you can add labels to signal lines and enable the Use signal labels to guide buffer reuse parameter. If possible, the code generator implements the reuse specification.

Recommended Settings

ApplicationSetting
DebuggingOff
TraceabilityOff
EfficiencyOn (execution, ROM, RAM)
Safety precautionNo impact

Programmatic Use

Parameter:LabelGuidedReuse
Type:character vector
Value: 'on' | 'off'
Default: 'off'

Version History

Introduced in R2018a