FLANG

Public Types | Public Member Functions | Static Public Member Functions | List of all members
fir::SequenceType Class Reference

`#include <flang/Optimizer/Dialect/FIRType.h>`

Inheritance diagram for fir::SequenceType:

## Public Types
using | Extent = int64_t
using | Shape = llvm::SmallVector< Extent, 8 >

## Public Member Functions
mlir::Type | getEleTy () const
| The element type of this sequence.
Shape | getShape () const
mlir::AffineMapAttr | getLayoutMap () const
unsigned | getDimension () const
| The number of dimensions of the sequence.
unsigned | getConstantRows () const
| Number of rows of constant extent.
bool | hasConstantShape () const
| Is the shape of the sequence constant?
bool | hasUnknownShape () const
| Does the sequence have unknown shape? (`array<* x T>`)
bool | hasConstantInterior () const

## Static Public Member Functions
static SequenceType | get (const Shape &shape, mlir::Type elementType, mlir::AffineMapAttr map={})
| Return a sequence type with the specified shape and element type.
static constexpr Extent | getUnknownExtent ()
| The value `-1` represents an unknown extent for a dimension.
static bool | kindof (unsigned kind)
static mlir::LogicalResult | verifyConstructionInvariants (mlir::Location loc, const Shape &shape, mlir::Type eleTy, mlir::AffineMapAttr map)

## Detailed Description

A sequence type is a multi-dimensional array of values. The sequence type may have an unknown number of dimensions or the extent of dimensions may be unknown. A sequence type models a Fortran array entity, giving it a type in FIR. A sequence type is assumed to be stored in a column-major order, which differs from LLVM IR and other dialects of MLIR.

## Member Function Documentation

## ◆ getShape()

SequenceType::Shape fir::SequenceType::getShape | ( |  | ) | const

The shape of the sequence. If the sequence has an unknown shape, the shape returned will be empty.

## ◆ hasConstantInterior()

bool fir::SequenceType::hasConstantInterior | ( |  | ) | const

Is the interior of the sequence constant? Check if the array is one of constant shape (`array<C...xCxT>`), unknown shape (`array<*xT>`), or rows with shape and ending with column(s) of unknown extent (`array<C...xCx?...x?xT>`).

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

- include/flang/Optimizer/Dialect/FIRType.h
- lib/Optimizer/Dialect/FIRType.cpp