37 namespace shape_util {
48 const SizeVector& r_shape);
58 const SizeVector& r_shape);
68 const SizeVector& dst_shape);
78 const SizeVector& dims,
84 int64_t
WrapDim(int64_t dim, int64_t max_dim);
92 SizeVector
InferShape(SizeVector shape, int64_t num_elements);
SizeVector InferShape(SizeVector shape, int64_t num_elements)
Definition: ShapeUtil.cpp:163
Definition: Open3DViewer.h:29
int64_t WrapDim(int64_t dim, int64_t max_dim)
Wrap around negative dim.
Definition: ShapeUtil.cpp:147
bool IsCompatibleBroadcastShape(const SizeVector &l_shape, const SizeVector &r_shape)
Returns true if two shapes are compatible for broadcasting.
Definition: ShapeUtil.cpp:48
SizeVector BroadcastedShape(const SizeVector &l_shape, const SizeVector &r_shape)
Returns the broadcasted shape of two shapes.
Definition: ShapeUtil.cpp:72
bool CanBeBrocastedToShape(const SizeVector &src_shape, const SizeVector &dst_shape)
Returns true if src_shape can be brocasted to dst_shape.
Definition: ShapeUtil.cpp:106
SizeVector ReductionShape(const SizeVector &src_shape, const SizeVector &dims, bool keepdim)
Returns the shape after reduction.
Definition: ShapeUtil.cpp:115