// Copyright (c) ONNX Project Contributors
//
// SPDX-License-Identifier: Apache-2.0

#include "onnx_core/shapes/shape_broadcast.h"
#include "onnx_extensions/shapes/shapes/math/shape_math.h"

namespace ONNX_LIGHT_NAMESPACE::onnx_shapes::shapes::math {

void ComputeShapeMul(ShapesContext &ctx, const NodeProto &node, const char *a, const char *b) {
  // Mul is element-wise with numpy-style broadcasting in every
  // currently-supported opset revision; the output dtype matches the
  // shared input dtype (type constraint ``T``).
  const TensorType out_dtype = ctx.Get(a).Dtype();
  ComputeShapeBinaryBroadcast(ctx, node, a, b, "Mul", out_dtype);
}

} // namespace ONNX_LIGHT_NAMESPACE::onnx_shapes::shapes::math
