MLIR  16.0.0git
Functions
Traits.cpp File Reference
#include "mlir/Dialect/Traits.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/TypeUtilities.h"
#include "llvm/Support/FormatVariadic.h"
+ Include dependency graph for Traits.cpp:

Go to the source code of this file.

Functions

static ArrayRef< int64_t > getShape (Type type)
 Returns the shape of the given type. More...
 
template<typename iterator_range >
static std::tuple< bool, bool > hasTensorOrVectorType (iterator_range types)
 Returns a tuple corresponding to whether range has tensor or vector type. More...
 
static bool isCompatibleInferredReturnShape (ArrayRef< int64_t > inferred, ArrayRef< int64_t > existing)
 
static std::string getShapeString (ArrayRef< int64_t > shape)
 

Function Documentation

◆ getShape()

static ArrayRef<int64_t> getShape ( Type  type)
static

◆ getShapeString()

static std::string getShapeString ( ArrayRef< int64_t >  shape)
static

Definition at line 212 of file Traits.cpp.

Referenced by mlir::OpTrait::impl::verifyCompatibleOperandBroadcast().

◆ hasTensorOrVectorType()

template<typename iterator_range >
static std::tuple<bool, bool> hasTensorOrVectorType ( iterator_range  types)
static

Returns a tuple corresponding to whether range has tensor or vector type.

Definition at line 189 of file Traits.cpp.

References mlir::Type::isa().

Referenced by mlir::OpTrait::impl::verifyCompatibleOperandBroadcast().

◆ isCompatibleInferredReturnShape()

static bool isCompatibleInferredReturnShape ( ArrayRef< int64_t >  inferred,
ArrayRef< int64_t >  existing 
)
static

Definition at line 195 of file Traits.cpp.

Referenced by mlir::OpTrait::impl::verifyCompatibleOperandBroadcast().