ReshapeOp:CanReshapeStorage<Input>extendsfalse ?never&{ __error:"Cannot reshape non-contiguous tensor. Call contiguous() first."; __hint:"Non-contiguous tensors must be made contiguous before reshaping."; } :CanReshape<Input["__shape"],NewShape>extendstrue ?StorageTransformation< "reshape", TensorStorage< Input["__dtype"], NewShape, ComputeReshapeStrides<Input,NewShape>, ViewLayout<Input["__layout"]>, >, readonly[Input], > :never&{ __cause:"Total number of elements must be the same"; __error:`Cannot reshape tensor of shape [${ShapeToString< Input["__shape"], >}] to shape [${ShapeToString<NewShape>}]`; __from_size:Product<Input["__shape"]>; __to_size:Product<NewShape>; }
Reshape operation with compile-time shape validation
Creates a new view of the tensor with a different shape.
The total number of elements must remain the same.
Reshape operation with compile-time shape validation
Creates a new view of the tensor with a different shape. The total number of elements must remain the same.
Requirements: