|
MLIR 22.0.0git
|
#include "mlir/Dialect/SPIRV/IR/SPIRVTypes.h"
Public Member Functions | |
| unsigned | getNumElements () const |
| Return the number of elements of the type. | |
| Type | getElementType (unsigned) const |
| bool | hasCompileTimeKnownNumElements () const |
| Return true if the number of elements is known at compile time and is not implementation dependent. | |
| Public Member Functions inherited from mlir::spirv::SPIRVType | |
| bool | isScalarOrVector () |
| void | getExtensions (ExtensionArrayRefVector &extensions, std::optional< StorageClass > storage=std::nullopt) |
| Appends to extensions the extensions needed for this type to appear in the given storage class. | |
| void | getCapabilities (CapabilityArrayRefVector &capabilities, std::optional< StorageClass > storage=std::nullopt) |
| Appends to capabilities the capabilities needed for this type to appear in the given storage class. | |
| std::optional< int64_t > | getSizeInBytes () |
| Returns the size in bytes for each type. | |
| constexpr | Type ()=default |
| Type (const ImplType *impl) | |
| Type (const Type &other)=default | |
| Public Member Functions inherited from mlir::Type | |
| constexpr | Type ()=default |
| Type (const ImplType *impl) | |
| Type (const Type &other)=default | |
| Type & | operator= (const Type &other)=default |
| bool | operator== (Type other) const |
| bool | operator!= (Type other) const |
| operator bool () const | |
| bool | operator! () const |
| TypeID | getTypeID () |
| Return a unique identifier for the concrete type. | |
| MLIRContext * | getContext () const |
| Return the MLIRContext in which this type was uniqued. | |
| Dialect & | getDialect () const |
| Get the dialect this type is registered to. | |
| bool | isIndex () const |
| bool | isBF16 () const |
| bool | isF16 () const |
| bool | isTF32 () const |
| bool | isF32 () const |
| bool | isF64 () const |
| bool | isF80 () const |
| bool | isF128 () const |
| bool | isFloat () const |
| Return true if this is an float type (with the specified width). | |
| bool | isFloat (unsigned width) const |
| Return true if this is a float type with the specified width. | |
| bool | isInteger () const |
| Return true if this is an integer type (with the specified width). | |
| bool | isInteger (unsigned width) const |
| bool | isSignlessInteger () const |
| Return true if this is a signless integer type (with the specified width). | |
| bool | isSignlessInteger (unsigned width) const |
| bool | isSignedInteger () const |
| Return true if this is a signed integer type (with the specified width). | |
| bool | isSignedInteger (unsigned width) const |
| bool | isUnsignedInteger () const |
| Return true if this is an unsigned integer type (with the specified width). | |
| bool | isUnsignedInteger (unsigned width) const |
| unsigned | getIntOrFloatBitWidth () const |
| Return the bit width of an integer or a float type, assert failure on other types. | |
| bool | isSignlessIntOrIndex () const |
| Return true if this is a signless integer or index type. | |
| bool | isSignlessIntOrIndexOrFloat () const |
| Return true if this is a signless integer, index, or float type. | |
| bool | isSignlessIntOrFloat () const |
| Return true of this is a signless integer or a float type. | |
| bool | isIntOrIndex () const |
| Return true if this is an integer (of any signedness) or an index type. | |
| bool | isIntOrFloat () const |
| Return true if this is an integer (of any signedness) or a float type. | |
| bool | isIntOrIndexOrFloat () const |
| Return true if this is an integer (of any signedness), index, or float type. | |
| void | print (raw_ostream &os) const |
| Print the current type. | |
| void | print (raw_ostream &os, AsmState &state) const |
| void | dump () const |
| friend::llvm::hash_code | hash_value (Type arg) |
| const void * | getAsOpaquePointer () const |
| Methods for supporting PointerLikeTypeTraits. | |
| template<typename InterfaceT> | |
| bool | hasPromiseOrImplementsInterface () |
| Returns true if InterfaceT has been promised by the dialect or implemented. | |
| template<template< typename T > class Trait> | |
| bool | hasTrait () |
| Returns true if the type was registered with a particular trait. | |
| const AbstractTy & | getAbstractType () const |
| Return the abstract type descriptor for this type. | |
| ImplType * | getImpl () const |
| Return the Type implementation. | |
| void | walkImmediateSubElements (function_ref< void(Attribute)> walkAttrsFn, function_ref< void(Type)> walkTypesFn) const |
| Walk all of the immediately nested sub-attributes and sub-types. | |
| auto | replaceImmediateSubElements (ArrayRef< Attribute > replAttrs, ArrayRef< Type > replTypes) const |
| Replace the immediately nested sub-attributes and sub-types with those provided. | |
| template<WalkOrder Order = WalkOrder::PostOrder, typename... WalkFns> | |
| auto | walk (WalkFns &&...walkFns) |
| Walk this type and all attibutes/types nested within using the provided walk functions. | |
| template<typename... ReplacementFns> | |
| auto | replace (ReplacementFns &&...replacementFns) |
| Recursively replace all of the nested sub-attributes and sub-types using the provided map functions. | |
Static Public Member Functions | |
| static bool | classof (Type type) |
| static bool | isValid (VectorType) |
| Returns true if the given vector type is valid for the SPIR-V dialect. | |
| Static Public Member Functions inherited from mlir::spirv::SPIRVType | |
| static bool | classof (Type type) |
| Static Public Member Functions inherited from mlir::Type | |
| static Type | getFromOpaquePointer (const void *pointer) |
Additional Inherited Members | |
| Public Types inherited from mlir::spirv::SPIRVType | |
| using | ExtensionArrayRefVector = SmallVectorImpl<ArrayRef<Extension>> |
| The extension requirements for each type are following the ((Extension::A OR Extension::B) AND (Extension::C OR Extension::D)) convention. | |
| using | CapabilityArrayRefVector = SmallVectorImpl<ArrayRef<Capability>> |
| The capability requirements for each type are following the ((Capability::A OR Extension::B) AND (Capability::C OR Capability::D)) convention. | |
| Public Types inherited from mlir::Type | |
| template<typename ConcreteType, typename BaseType, typename StorageType, template< typename T > class... Traits> | |
| using | TypeBase |
| Utility class for implementing types. | |
| using | ImplType = TypeStorage |
| using | AbstractTy = AbstractType |
| Protected Attributes inherited from mlir::Type | |
| ImplType * | impl {nullptr} |
Definition at line 95 of file SPIRVTypes.h.
Definition at line 180 of file SPIRVTypes.cpp.
References isValid(), and mlir::spirv::SPIRVType::Type().
Definition at line 194 of file SPIRVTypes.cpp.
References mlir::spirv::MatrixType::getColumnType(), mlir::spirv::MatrixType::getElementType(), and mlir::spirv::SPIRVType::Type().
| unsigned CompositeType::getNumElements | ( | ) | const |
Return the number of elements of the type.
This should only be called if hasCompileTimeKnownNumElements is true.
Definition at line 204 of file SPIRVTypes.cpp.
References mlir::spirv::MatrixType::getNumColumns().
| bool CompositeType::hasCompileTimeKnownNumElements | ( | ) | const |
Return true if the number of elements is known at compile time and is not implementation dependent.
Definition at line 212 of file SPIRVTypes.cpp.
|
static |
Returns true if the given vector type is valid for the SPIR-V dialect.
Definition at line 188 of file SPIRVTypes.cpp.
Referenced by classof(), and mlir::spirv::SPIRVType::classof().