Main Content

Reuse buffers for Data Store Read and Data Store Write blocks

Eliminate temporary buffers for Data Store Read and Data Store Write blocks

Model Configuration Pane: Code Generation / Optimization

Description

The Reuse buffers for Data Store Read and Data Store Write blocks parameter instructs the code generator to remove temporary buffers for Data Store Read and Data Store Write blocks. Use the Data Store Memory block directly if possible.

Dependencies

The parameter Signal Storage Reuse enables this parameter.

Settings

on (default) | off
On

Embedded Coder® reads directly from the Data Store Memory block and writes directly to the Data Store Memory block, if possible. Using the Data Store Memory block directly eliminates data copies in the generated code, conserving RAM consumption and increasing code execution speed.

Off

Embedded Coder inserts buffers in the generated code for Data Store Read and Data Store Write blocks.

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityOff
EfficiencyOn
Safety precaution

No recommendation

Programmatic Use

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

Version History

Introduced in R2017a