Gain parameters inherit a built-in integer type that is lossless
Parameter data type for Gain blocks that inherit via internal rule
Model Configuration Pane: Math and Data Types
Description
The Gain parameters inherit a built-in integer type that is lossless parameter specifies whether the data type of the gain parameter is a built-in integer when certain conditions are met.
These conditions are:
The input type is a built-in integer.
The Parameter data type is set to
Inherit:Inherit via internal rule
.The value of the gain parameter can be represented without losing any precision by a built-in integer.
The Parameter minimum and Parameter maximum values in the Parameter Attributes tab of the Gain block parameters can be represented without losing any precision by a built-in integer.
Dependencies
In cases where the data type of the gain parameter compiles to a fixed-point data type (non-zero scaling), the software checks out a Fixed-Point Designer™ license.
Settings
off
(default) | on
- On
For Gain blocks with the Parameter data type set to
Inherit:Inherit via internal rule
, the parameter data type compiles to a built-in integer type whenever possible.- Off
For Gain blocks with the Parameter data type set to
Inherit:Inherit via internal rule
, the parameter data type is the type which maximizes precision.
Tips
This optimization affects both simulation and code generation.
This optimization affects only Gain blocks in the model.
For more efficient code, specify the Parameter minimum and Parameter maximum values in the Parameter Attributes tab of the Gain block parameters.
Recommended Settings
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | On (when target hardware supports efficient multiplication) Off (otherwise) |
Safety precaution | No recommendation |
Programmatic Use
Parameter: GainParamInheritBuiltInType |
Value: 'on' | 'off' |
Default: 'off' |
Version History
Introduced in R2019a