|
MLIR 23.0.0git
|
#include "mlir/Dialect/Quant/IR/QuantTypes.h"
Public Types | |
| using | ImplType = detail::QuantileTypeStorage |
| Public Types inherited from mlir::detail::StorageUserBase< ConcreteType, BaseType, StorageType, detail::TypeUniquer, Traits... > | |
| using | Base |
| Utility declarations for the concrete attribute class. | |
| using | ImplType |
| using | HasTraitFn |
Public Member Functions | |
| Type | getStorageType () const |
| Type | getQuantileType () const |
| ArrayRef< double > | getQuantiles () const |
| Return the quantile table of this float type. | |
| std::optional< int64_t > | getStorageMin () const |
| Return the explicit storage minimum, if set. | |
| std::optional< int64_t > | getStorageMax () const |
| Return the explicit storage maximum, if set. | |
| void | print (mlir::AsmPrinter &printer) const |
| bool | shouldDefaultToSigned () const |
| unsigned | getStorageWidth () const |
| int64_t | getDefaultMinimum (bool isSigned) const |
| int64_t | getDefaultMaximum (bool isSigned) const |
| std::string | getStorageTypeName (bool isSigned) const |
| bool | isPacked () const |
| unsigned | getLogicalBitWidth () const |
| unsigned | getElementsPerByte () const |
| std::optional< unsigned > | getPreferredAlignmentBytes () const |
| Public Member Functions inherited from mlir::detail::StorageUserBase< ConcreteType, BaseType, StorageType, detail::TypeUniquer, Traits... > | |
| ImplType * | getImpl () const |
| Utility for easy access to the storage instance. | |
Static Public Member Functions | |
| static QuantileType | get (mlir::MLIRContext *ctx, Type storageType, Type quantileType, ArrayRef< double > quantiles={}, std::optional< int64_t > storageMin=std::nullopt, std::optional< int64_t > storageMax=std::nullopt) |
| static QuantileType | getChecked (function_ref< InFlightDiagnostic()> emitError, mlir::MLIRContext *ctx, Type storageType, Type quantileType, ArrayRef< double > quantiles, std::optional< int64_t > storageMin=std::nullopt, std::optional< int64_t > storageMax=std::nullopt) |
| static LogicalResult | verifyInvariants (function_ref< InFlightDiagnostic()> emitError, Type storageType, Type quantileType, ArrayRef< double > quantiles, std::optional< int64_t > storageMin, std::optional< int64_t > storageMax) |
| static bool | classof (mlir::Type type) |
| Methods for support type inquiry through isa, cast, and dyn_cast. | |
| static constexpr llvm::StringLiteral | getMnemonic () |
| Static Public Member Functions inherited from mlir::detail::StorageUserBase< ConcreteType, BaseType, StorageType, detail::TypeUniquer, Traits... > | |
| static TypeID | getTypeID () |
| Return a unique identifier for the concrete type. | |
| static bool | classof (T val) |
| Provide an implementation of 'classof' that compares the type id of the provided value with that of the concrete type. | |
| static detail::InterfaceMap | getInterfaceMap () |
| Returns an interface map for the interfaces registered to this storage user. | |
| static HasTraitFn | getHasTraitFn () |
| Returns the function that returns true if the given Trait ID matches the IDs of any of the traits defined by the storage user. | |
| static auto | getWalkImmediateSubElementsFn () |
| Returns a function that walks immediate sub elements of a given instance of the storage user. | |
| static auto | getReplaceImmediateSubElementsFn () |
| Returns a function that replaces immediate sub elements of a given instance of the storage user. | |
| static void | attachInterface (MLIRContext &context) |
| Attach the given models as implementations of the corresponding interfaces for the concrete storage user class. | |
| static ConcreteType | get (MLIRContext *ctx, Args &&...args) |
| Get or create a new ConcreteT instance within the ctx. | |
| static ConcreteType | getChecked (const Location &loc, Args &&...args) |
| Get or create a new ConcreteT instance within the ctx, defined at the given, potentially unknown, location. | |
| static ConcreteType | getChecked (function_ref< InFlightDiagnostic()> emitErrorFn, MLIRContext *ctx, Args... args) |
| Get or create a new ConcreteT instance within the ctx. | |
| static ConcreteType | getFromOpaquePointer (const void *ptr) |
| Get an instance of the concrete type from a void pointer. | |
Static Public Attributes | |
| static constexpr llvm::StringLiteral | name = "quantile" |
Additional Inherited Members | |
| Protected Member Functions inherited from mlir::detail::StorageUserBase< ConcreteType, BaseType, StorageType, detail::TypeUniquer, Traits... > | |
| LogicalResult | mutate (Args &&...args) |
| Mutate the current storage instance. | |
| Static Protected Member Functions inherited from mlir::detail::StorageUserBase< ConcreteType, BaseType, StorageType, detail::TypeUniquer, Traits... > | |
| static LogicalResult | verifyInvariants (Args... args) |
| Default implementation that just returns success. | |
Definition at line 589 of file QuantTypes.h.
Definition at line 594 of file QuantTypes.h.
|
static |
Methods for support type inquiry through isa, cast, and dyn_cast.
Definition at line 613 of file QuantTypes.cpp.
References mlir::TypeID::get(), and mlir::Type::getTypeID().
|
static |
Definition at line 558 of file QuantTypes.cpp.
References mlir::detail::StorageUserBase< ConcreteType, BaseType, StorageType, detail::TypeUniquer, Traits... >::get().
|
static |
Definition at line 567 of file QuantTypes.cpp.
References mlir::emitError(), and mlir::detail::StorageUserBase< ConcreteType, BaseType, StorageType, detail::TypeUniquer, Traits... >::getChecked().
Definition at line 648 of file QuantTypes.cpp.
References getStorageMax(), and getStorageWidth().
Definition at line 656 of file QuantTypes.cpp.
References getStorageMin(), and getStorageWidth().
| unsigned QuantileType::getElementsPerByte | ( | ) | const |
Definition at line 685 of file QuantTypes.cpp.
References getStorageWidth().
| unsigned QuantileType::getLogicalBitWidth | ( | ) | const |
Definition at line 683 of file QuantTypes.cpp.
References getStorageWidth().
|
inlinestaticconstexpr |
Definition at line 638 of file QuantTypes.h.
| std::optional< unsigned > QuantileType::getPreferredAlignmentBytes | ( | ) | const |
Definition at line 690 of file QuantTypes.cpp.
| ArrayRef< double > QuantileType::getQuantiles | ( | ) | const |
Return the quantile table of this float type.
Definition at line 625 of file QuantTypes.cpp.
References getQuantiles().
Referenced by getQuantiles(), getStorageTypeName(), and printQuantileType().
| mlir::Type QuantileType::getQuantileType | ( | ) | const |
Definition at line 621 of file QuantTypes.cpp.
References getQuantileType().
Referenced by getQuantileType(), getStorageTypeName(), and printQuantileType().
| std::optional< int64_t > QuantileType::getStorageMax | ( | ) | const |
Return the explicit storage maximum, if set.
Definition at line 633 of file QuantTypes.cpp.
References getStorageMax().
Referenced by getDefaultMaximum(), getStorageMax(), getStorageTypeName(), and printQuantileType().
| std::optional< int64_t > QuantileType::getStorageMin | ( | ) | const |
Return the explicit storage minimum, if set.
Definition at line 629 of file QuantTypes.cpp.
References getStorageMin().
Referenced by getDefaultMinimum(), getStorageMin(), getStorageTypeName(), and printQuantileType().
| mlir::Type QuantileType::getStorageType | ( | ) | const |
Definition at line 617 of file QuantTypes.cpp.
References getStorageType().
Referenced by getStorageType(), getStorageTypeName(), getStorageWidth(), printQuantileType(), and shouldDefaultToSigned().
| std::string QuantileType::getStorageTypeName | ( | bool | isSigned | ) | const |
Definition at line 664 of file QuantTypes.cpp.
References getQuantiles(), getQuantileType(), getStorageMax(), getStorageMin(), getStorageType(), and result.
| unsigned QuantileType::getStorageWidth | ( | ) | const |
Definition at line 644 of file QuantTypes.cpp.
References mlir::Type::getIntOrFloatBitWidth(), and getStorageType().
Referenced by getDefaultMaximum(), getDefaultMinimum(), getElementsPerByte(), getLogicalBitWidth(), and isPacked().
| bool QuantileType::isPacked | ( | ) | const |
Definition at line 681 of file QuantTypes.cpp.
References getStorageWidth().
| void mlir::quant::QuantileType::print | ( | mlir::AsmPrinter & | printer | ) | const |
| bool QuantileType::shouldDefaultToSigned | ( | ) | const |
Definition at line 637 of file QuantTypes.cpp.
References getStorageType().
|
static |
Definition at line 575 of file QuantTypes.cpp.
References mlir::emitError(), mlir::Type::getIntOrFloatBitWidth(), mlir::Type::isIntOrFloat(), and success().
|
staticconstexpr |
Definition at line 640 of file QuantTypes.h.