My Project
Public Types | Public Member Functions | Static Public Member Functions | List of all members
mlir::TupleType Class Reference

#include <StandardTypes.h>

Inheritance diagram for mlir::TupleType:
Inheritance graph
[legend]
Collaboration diagram for mlir::TupleType:
Collaboration graph
[legend]

Public Types

using iterator = ArrayRef< Type >::iterator
 Iterate over the held elements. More...
 
- Public Types inherited from mlir::detail::StorageUserBase< ConcreteT, BaseT, StorageT, UniquerT >
using Base = StorageUserBase< ConcreteT, BaseT, StorageT, UniquerT >
 Utility declarations for the concrete attribute class. More...
 
using ImplType = StorageT
 

Public Member Functions

ArrayRef< TypegetTypes () const
 Return the elements types for this tuple. More...
 
void getFlattenedTypes (SmallVectorImpl< Type > &types)
 
size_t size () const
 Return the number of held types. More...
 
iterator begin () const
 
iterator end () const
 
Type getType (size_t index) const
 Return the element type at index 'index'. More...
 

Static Public Member Functions

static TupleType get (ArrayRef< Type > elementTypes, MLIRContext *context)
 TupleType. More...
 
static TupleType get (MLIRContext *context)
 Get or create an empty tuple type. More...
 
static bool kindof (unsigned kind)
 
- Static Public Member Functions inherited from mlir::detail::StorageUserBase< ConcreteT, BaseT, StorageT, UniquerT >
static ClassIDgetClassID ()
 Return a unique identifier for the concrete type. More...
 
template<typename T >
static bool classof (T val)
 

Additional Inherited Members

- Protected Member Functions inherited from mlir::detail::StorageUserBase< ConcreteT, BaseT, StorageT, UniquerT >
ImplTypegetImpl () const
 Utility for easy access to the storage instance. More...
 
- Static Protected Member Functions inherited from mlir::detail::StorageUserBase< ConcreteT, BaseT, StorageT, UniquerT >
template<typename... Args>
static ConcreteT get (MLIRContext *ctx, unsigned kind, Args... args)
 
template<typename... Args>
static ConcreteT getChecked (const Location &loc, MLIRContext *ctx, unsigned kind, Args... args)
 
template<typename... Args>
static LogicalResult verifyConstructionInvariants (Args... args)
 Default implementation that just returns success. More...
 

Detailed Description

Tuple types represent a collection of other types. Note: This type merely provides a common mechanism for representing tuples in MLIR. It is up to dialect authors to provides operations for manipulating them, e.g. extract_tuple_element. When possible, users should prefer multi-result operations in the place of tuples.

Member Typedef Documentation

◆ iterator

Iterate over the held elements.

Member Function Documentation

◆ begin()

iterator mlir::TupleType::begin ( ) const
inline

◆ end()

iterator mlir::TupleType::end ( ) const
inline

◆ get() [1/2]

TupleType TupleType::get ( ArrayRef< Type elementTypes,
MLIRContext context 
)
static

TupleType.

Get or create a new TupleType with the provided element types. Assumes the arguments define a well-formed type.

◆ get() [2/2]

static TupleType mlir::TupleType::get ( MLIRContext context)
inlinestatic

Get or create an empty tuple type.

◆ getFlattenedTypes()

void TupleType::getFlattenedTypes ( SmallVectorImpl< Type > &  types)

Accumulate the types contained in this tuple and tuples nested within it. Note that this only flattens nested tuples, not any other container type, e.g. a tuple<i32, tensor<i32>, tuple<f32, tuple<i64>>> is flattened to (i32, tensor<i32>, f32, i64)

◆ getType()

Type mlir::TupleType::getType ( size_t  index) const
inline

Return the element type at index 'index'.

◆ getTypes()

ArrayRef< Type > TupleType::getTypes ( ) const

Return the elements types for this tuple.

◆ kindof()

static bool mlir::TupleType::kindof ( unsigned  kind)
inlinestatic

◆ size()

size_t TupleType::size ( ) const

Return the number of held types.

Return the number of element types.


The documentation for this class was generated from the following files: