My Project
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
mlir::MemRefType Class Reference

#include <StandardTypes.h>

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

Public Member Functions

ArrayRef< int64_t > getShape () const
 
ArrayRef< AffineMapgetAffineMaps () const
 
unsigned getMemorySpace () const
 Returns the memory space in which data referred to by this memref resides. More...
 

Static Public Member Functions

static MemRefType get (ArrayRef< int64_t > shape, Type elementType, ArrayRef< AffineMap > affineMapComposition={}, unsigned memorySpace=0)
 
static MemRefType getChecked (ArrayRef< int64_t > shape, Type elementType, ArrayRef< AffineMap > affineMapComposition, unsigned memorySpace, Location location)
 
static int64_t getDynamicStrideOrOffset ()
 
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)
 

Static Public Attributes

static constexpr int64_t kDynamicSize = -1
 

Additional Inherited Members

- 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
 
- 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

MemRef types represent a region of memory that have a shape with a fixed number of dimensions. Each shape element can be a non-negative integer or unknown (represented by any negative integer). MemRef types also have an affine map composition, represented as an array AffineMap pointers.

Member Function Documentation

◆ get()

MemRefType MemRefType::get ( ArrayRef< int64_t >  shape,
Type  elementType,
ArrayRef< AffineMap affineMapComposition = {},
unsigned  memorySpace = 0 
)
static

Get or create a new MemRefType based on shape, element type, affine map composition, and memory space. Assumes the arguments define a well-formed MemRef type. Use getChecked to gracefully handle MemRefType construction failures.

◆ getAffineMaps()

ArrayRef< AffineMap > MemRefType::getAffineMaps ( ) const

Returns an array of affine map pointers representing the memref affine map composition.

◆ getChecked()

MemRefType MemRefType::getChecked ( ArrayRef< int64_t >  shape,
Type  elementType,
ArrayRef< AffineMap affineMapComposition,
unsigned  memorySpace,
Location  location 
)
static

Get or create a new MemRefType based on shape, element type, affine map composition, and memory space declared at the given location. If the location is unknown, the last argument should be an instance of UnknownLoc. If the MemRefType defined by the arguments would be ill-formed, emits errors (to the handler registered with the context or to the error stream) and returns nullptr.

◆ getDynamicStrideOrOffset()

static int64_t mlir::MemRefType::getDynamicStrideOrOffset ( )
inlinestatic

◆ getMemorySpace()

unsigned MemRefType::getMemorySpace ( ) const

Returns the memory space in which data referred to by this memref resides.

◆ getShape()

ArrayRef< int64_t > MemRefType::getShape ( ) const

◆ kindof()

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

Member Data Documentation

◆ kDynamicSize

constexpr int64_t mlir::MemRefType::kDynamicSize = -1
static

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