14 #ifndef MLIR_DIALECT_TRAITS_H
15 #define MLIR_DIALECT_TRAITS_H
87 template <
typename ConcreteType>
89 :
public TraitBase<ConcreteType, ResultsBroadcastableShape> {
Trait for ops that are known to have broadcast compatible operands and result types.
static LogicalResult verifyTrait(Operation *op)
Helper class for implementing traits.
Operation is the basic unit of execution within MLIR.
Instances of the Type class are uniqued, have an immutable identifier and an optional mutable compone...
LogicalResult verifyCompatibleOperandBroadcast(Operation *op)
bool 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 erro...
Type getBroadcastedType(Type type1, Type type2, Type elementType=nullptr)
Returns the result broadcast composition type from the two given types by following NumPy broadcast s...
bool 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 broa...
Include the generated interface declarations.