Main Content

Preserve input data for entry-point functions

Whether to protect entry-point input data from modification

Since R2024b

Description

App Configuration Pane: Speed

Configuration Objects: coder.CodeConfig | coder.EmbeddedCodeConfig

Whether to protect entry-point input data from modification when the generated code is called from your custom C/C+ code, specified as false or true. See Generate Code That Preserves Entry-Point Input Data.

If you enable this setting, the generated code might include extra copies of the input data. If you pass large-size data, this behavior might increase the execution time and memory use of the generated code.

If you generate code for a MATLAB® entry-point function that uses the same variable as both an input and an output, the code generator does not preserve this input data even when you set the PreserveInputData configuration property to true. See Avoid Data Copies of Function Inputs in Generated Code.

Settings

Off

This setting is the default setting.

On

Programmatic Use

Property: PreserveInputData
Values: false | true
Default: false

Version History

Introduced in R2024b