ReshapeDescriptor constructor

ReshapeDescriptor({
  1. required LayoutShape inputShape,
  2. required LayoutShape outputShape,
})

Creates a reshape between equally sized layouts.

Implementation

ReshapeDescriptor({
  required this.inputShape,
  required this.outputShape,
}) {
  if (inputShape.elementCount != outputShape.elementCount) {
    throw RohdHclException(
      'Cannot reshape ${inputShape.elementCount} elements into '
      '${outputShape.elementCount} elements.',
    );
  }
}