Specify whether to generate code that explicitly initializes floating-point data to 0.0.
Category: Optimization
Default: On (GUI), 'off'
(command line)
Uses memset
to clear internal storage for
floating-point data to integer bit pattern 0
(all bits 0), regardless of type. If
your compiler and target CPU both represent floating-point zero with the
integer bit pattern 0
, use this parameter to gain
execution and ROM efficiency.
This parameter requires that you turn on the configuration parameter Memcpy threshold to enable the memset functionality. Check that the value of the threshold is set high enough.
Generates code to explicitly initialize storage for data of types
float
and double
to 0.0. The
resulting code is slightly less efficient than code generated when you
select the option.
This parameter requires a Simulink® Coder™ license.
Parameter:
InitFltsAndDblsToZero |
Value:
'on' | 'off' |
Default:
'off' |
Note
The command-line values are reverse of the settings values. Therefore,
'on'
in the command line corresponds to the description
of “Off” in the settings section, and 'off'
in
the command line corresponds to the description of “On” in the
settings section.
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | On (GUI), 'off' (command line) (execution,
ROM), No impact
(RAM) |
Safety precaution | No impact |