TypeTensor - v0.1.0
    Preparing search index...

    Type Alias BinaryOp<A, B, Op>

    BinaryOp: CanBroadcast<A["__shape"], B["__shape"]> extends true
        ? StorageTransformation<
            Op,
            TensorStorage<
                Promote<A["__dtype"], B["__dtype"]>,
                BroadcastShapes<A["__shape"], B["__shape"]>,
                ComputeStrides<BroadcastShapes<A["__shape"], B["__shape"]>>,
                BinaryOpLayout,
            >,
            readonly [A, B],
        >
        : never & {
            __error: `Cannot broadcast shapes [${ShapeToString<A["__shape"]>}] and [${ShapeToString<
                B["__shape"],
            >}]`;
        }

    Base binary operation interface with broadcasting and dtype promotion

    This type validates that shapes can broadcast and computes the output type. If shapes cannot broadcast, it returns never which will trigger error messages.

    Type Parameters