MLIR  22.0.0git
Public Member Functions | Static Public Member Functions | List of all members
mlir::StridedMetadataRange Class Reference

A class that represents the strided metadata range information, including offsets, sizes, and strides as integer ranges. More...

#include "mlir/Interfaces/InferStridedMetadataInterface.h"

Public Member Functions

 StridedMetadataRange ()=default
 Default constructor creates uninitialized ranges. More...
 
bool isUninitialized () const
 Returns whether the metadata is uninitialized. More...
 
ArrayRef< ConstantIntRangesgetOffsets () const
 Get the offsets range. More...
 
MutableArrayRef< ConstantIntRangesgetOffsets ()
 
ArrayRef< ConstantIntRangesgetSizes () const
 Get the sizes ranges. More...
 
MutableArrayRef< ConstantIntRangesgetSizes ()
 
ArrayRef< ConstantIntRangesgetStrides () const
 Get the strides ranges. More...
 
MutableArrayRef< ConstantIntRangesgetStrides ()
 
bool operator== (const StridedMetadataRange &other) const
 Compare two strided metadata ranges. More...
 
void print (raw_ostream &os) const
 Print the strided metadata range. More...
 

Static Public Member Functions

static StridedMetadataRange getRanked (SmallVectorImpl< ConstantIntRanges > &&offsets, SmallVectorImpl< ConstantIntRanges > &&sizes, SmallVectorImpl< ConstantIntRanges > &&strides)
 Returns a ranked strided metadata range. More...
 
static StridedMetadataRange getMaxRanges (int32_t indexBitwidth, int32_t offsetsRank, int32_t sizeRank, int32_t stridedRank)
 Returns a strided metadata range with maximum ranges. More...
 
static StridedMetadataRange getMaxRanges (int32_t indexBitwidth, int32_t rank)
 
static StridedMetadataRange join (const StridedMetadataRange &lhs, const StridedMetadataRange &rhs)
 Join two strided metadata ranges, by taking the element-wise union of the metadata. More...
 

Detailed Description

A class that represents the strided metadata range information, including offsets, sizes, and strides as integer ranges.

Definition at line 22 of file InferStridedMetadataInterface.h.

Constructor & Destructor Documentation

◆ StridedMetadataRange()

mlir::StridedMetadataRange::StridedMetadataRange ( )
default

Default constructor creates uninitialized ranges.

Referenced by getMaxRanges(), getRanked(), and join().

Member Function Documentation

◆ getMaxRanges() [1/2]

static StridedMetadataRange mlir::StridedMetadataRange::getMaxRanges ( int32_t  indexBitwidth,
int32_t  offsetsRank,
int32_t  sizeRank,
int32_t  stridedRank 
)
inlinestatic

Returns a strided metadata range with maximum ranges.

Definition at line 37 of file InferStridedMetadataInterface.h.

References mlir::ConstantIntRanges::maxRange(), and StridedMetadataRange().

Referenced by getEntryStateImpl(), and getMaxRanges().

◆ getMaxRanges() [2/2]

static StridedMetadataRange mlir::StridedMetadataRange::getMaxRanges ( int32_t  indexBitwidth,
int32_t  rank 
)
inlinestatic

Definition at line 50 of file InferStridedMetadataInterface.h.

References getMaxRanges().

◆ getOffsets() [1/2]

MutableArrayRef<ConstantIntRanges> mlir::StridedMetadataRange::getOffsets ( )
inline

Definition at line 62 of file InferStridedMetadataInterface.h.

◆ getOffsets() [2/2]

ArrayRef<ConstantIntRanges> mlir::StridedMetadataRange::getOffsets ( ) const
inline

Get the offsets range.

Definition at line 59 of file InferStridedMetadataInterface.h.

◆ getRanked()

static StridedMetadataRange mlir::StridedMetadataRange::getRanked ( SmallVectorImpl< ConstantIntRanges > &&  offsets,
SmallVectorImpl< ConstantIntRanges > &&  sizes,
SmallVectorImpl< ConstantIntRanges > &&  strides 
)
inlinestatic

Returns a ranked strided metadata range.

Definition at line 29 of file InferStridedMetadataInterface.h.

References StridedMetadataRange().

◆ getSizes() [1/2]

MutableArrayRef<ConstantIntRanges> mlir::StridedMetadataRange::getSizes ( )
inline

Definition at line 68 of file InferStridedMetadataInterface.h.

◆ getSizes() [2/2]

ArrayRef<ConstantIntRanges> mlir::StridedMetadataRange::getSizes ( ) const
inline

Get the sizes ranges.

Definition at line 67 of file InferStridedMetadataInterface.h.

◆ getStrides() [1/2]

MutableArrayRef<ConstantIntRanges> mlir::StridedMetadataRange::getStrides ( )
inline

Definition at line 72 of file InferStridedMetadataInterface.h.

◆ getStrides() [2/2]

ArrayRef<ConstantIntRanges> mlir::StridedMetadataRange::getStrides ( ) const
inline

Get the strides ranges.

Definition at line 71 of file InferStridedMetadataInterface.h.

◆ isUninitialized()

bool mlir::StridedMetadataRange::isUninitialized ( ) const
inline

Returns whether the metadata is uninitialized.

Definition at line 56 of file InferStridedMetadataInterface.h.

Referenced by join(), and print().

◆ join()

static StridedMetadataRange mlir::StridedMetadataRange::join ( const StridedMetadataRange lhs,
const StridedMetadataRange rhs 
)
inlinestatic

Join two strided metadata ranges, by taking the element-wise union of the metadata.

Definition at line 85 of file InferStridedMetadataInterface.h.

References isUninitialized(), mlir::ConstantIntRanges::rangeUnion(), and StridedMetadataRange().

◆ operator==()

bool mlir::StridedMetadataRange::operator== ( const StridedMetadataRange other) const
inline

Compare two strided metadata ranges.

Definition at line 75 of file InferStridedMetadataInterface.h.

◆ print()

void StridedMetadataRange::print ( raw_ostream &  os) const

Print the strided metadata range.

Definition at line 18 of file InferStridedMetadataInterface.cpp.

References isUninitialized().

Referenced by mlir::operator<<().


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