MLIR 22.0.0git
Traits.h File Reference

Go to the source code of this file.

Classes

class  mlir::OpTrait::ResultsBroadcastableShape< ConcreteType >
 Trait for ops that are known to have broadcast compatible operands and result types. More...

Namespaces

namespace  mlir
 Include the generated interface declarations.
namespace  mlir::OpTrait
namespace  mlir::OpTrait::impl
namespace  mlir::OpTrait::util

Functions

LogicalResult mlir::OpTrait::impl::verifyCompatibleOperandBroadcast (Operation *op)
bool mlir::OpTrait::util::getBroadcastedShape (ArrayRef< int64_t > shape1, ArrayRef< int64_t > shape2, SmallVectorImpl< int64_t > &resultShape)
 Returns true and sets resultShape to the broadcasted shape from the two given shapes if they are broadcast compatible.
bool mlir::OpTrait::util::staticallyKnownBroadcastable (ArrayRef< SmallVector< int64_t, 6 > > shapes)
 Returns true if a broadcast between n shapes is guaranteed to be successful and not result in an error.
bool mlir::OpTrait::util::staticallyKnownBroadcastable (ArrayRef< int64_t > shape1, ArrayRef< int64_t > shape2)
Type mlir::OpTrait::util::getBroadcastedType (Type type1, Type type2, Type elementType=nullptr)
 Returns the result broadcast composition type from the two given types by following NumPy broadcast semantics.