tile method

InferenceTensorTile<Logic, LogicValue> tile({
  1. String? name,
})

Creates a typed tile with matching numeric metadata and masks.

Implementation

InferenceTensorTile<Logic, LogicValue> tile({String? name}) {
  final prototype = formatKnob.element(signed: signedKnob.value);
  final width = formatKnob.widthKnob.value;
  final fraction = formatKnob.fractionBitsKnob.value;
  final format = fraction == 0
      ? (signedKnob.value
          ? InferenceNumericFormat.signedInteger(width)
          : InferenceNumericFormat.unsignedInteger(width))
      : InferenceNumericFormat.fixedPoint(
          signed: signedKnob.value,
          integerWidth: width - fraction - (signedKnob.value ? 1 : 0),
          fractionWidth: fraction,
        );
  return InferenceTensorTile(
    rowCount: rowsKnob.value,
    columnCount: columnsKnob.value,
    elementBuilder: prototype.clone,
    format: format,
    numUnpackedDimensions: unpackedKnob.value ? 2 : 0,
    name: name ?? 'tile',
  );
}