Remove code from floating-point to integer conversions that wraps out-of-range values
Description
Remove wrapping code that handles out-of-range floating-point to integer conversion results.
Category:Optimization
Settings
Default:Off
- On
-
Removes code when out-of-range conversions occur. 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 the outputs or parameters of a block involves converting floating-point data to integer or fixed-point data.
TheSaturate on integer overflowcheck box is cleared in the Block Parameters dialog box.
Caution
Execution of generated code might not produce the same results as simulation.
- Off
-
Results for simulation and execution of generated code match when out-of-range conversions occur. The generated code is larger than when you select this check box.
Tips
Selecting this check box reduces the size and increases the speed of the generated code at the cost of potentially producing results that do not match simulation in the case of out-of-range values.
选择此复选框影响code generation results only for out-of-range values and cannot cause code generation results to differ from simulation results for in-range values.
Dependency
This parameter requires a金宝app®Coder™license.
Command-Line Information
Parameter:EfficientFloat2IntCast |
Value:'on' |'off' |
Default:'off' |
Recommended Settings
Application | Setting |
---|---|
Debugging | Off |
Traceability | Off |
Efficiency | On (execution, ROM), No impact (RAM) |
Safety precaution | No impact |