Remove code from floating-point to integer conversions with saturation that maps NaN to zero
Control generation of protective code that handles floating-point to integer conversion for
Model Configuration Pane: Code Generation / Optimization
The Remove code from floating-point to integer conversions with saturation that maps NaN to zero parameters instructs the code generator to remove code that handles floating-point to integer conversion results for
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.
Removes code when mapping from
NaNto 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.
Execution of generated code might not produce the same results as simulation.
Results for simulation and execution of generated code match when mapping from
NaNto 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
Selecting this check box affects code generation results only for
NaNvalues and cannot cause code generation results to differ from simulation results for other values.
|Safety precaution||No recommendation|
|Type: character vector|
Introduced in R2008b