InferenceNumericFormat.signedInteger constructor
- int width, {
- int? productWidth,
- int? accumulatorWidth,
- NumericRoundingMode roundingMode = NumericRoundingMode.nearestEven,
- NumericOverflowMode overflowMode = NumericOverflowMode.saturate,
Creates a signed integer inference format.
Implementation
factory InferenceNumericFormat.signedInteger(
int width, {
int? productWidth,
int? accumulatorWidth,
NumericRoundingMode roundingMode = NumericRoundingMode.nearestEven,
NumericOverflowMode overflowMode = NumericOverflowMode.saturate,
}) {
final resolvedProductWidth = productWidth ?? width * 2;
return InferenceNumericFormat(
elementKind: InferenceElementKind.signedInteger,
elementWidth: width,
productWidth: resolvedProductWidth,
accumulatorWidth: accumulatorWidth ?? resolvedProductWidth,
signed: true,
roundingMode: roundingMode,
overflowMode: overflowMode,
);
}