Remove code that handles floating-point to integer conversion results for
NaN
values.
Category: Optimization
Default: On
Removes code when mapping from NaN
to integer zero
occurs. Select this check box if code efficiency is critical to your
application and the following conditions are true for at least one block
in the model:
Computing outputs or parameters of a block involves converting floating-point data to integer or fixed-point data.
The Saturate on integer overflow check box is selected in the Block Parameters dialog box.
Caution
Execution of generated code might not produce the same results as simulation.
Results for simulation and execution of generated code match when
mapping from NaN
to integer zero occurs. The
generated code is larger than when you select this check box.
Selecting this check box reduces the size and increases the speed of the
generated code at the cost of producing results that do not match simulation
in the case of NaN
values.
Selecting this check box affects code generation results only for
NaN
values and cannot cause code generation results
to differ from simulation results for other values.
This parameter requires a Simulink® Coder™ license.
For ERT-based targets, this parameter is enabled when you select the floating-point numbers and non-finite numbers check boxes in the Code Generation > Interface pane.
Parameter:
EfficientMapNaN2IntZero |
Value:
'on' | 'off' |
Default:
'on' |
Application | Setting |
---|---|
Debugging | Off |
Traceability | Off |
Efficiency | On |
Safety precaution | No recommendation |