MLIR 23.0.0git
mlir::memref::LinearizedMemRefInfo Struct Reference

For a memref with offset, sizes and strides, returns the offset, size, and potentially the size padded at the front to use for the linearized memref. More...

#include "mlir/Dialect/MemRef/Utils/MemRefUtils.h"

Public Attributes

OpFoldResult linearizedOffset
OpFoldResult linearizedSize
OpFoldResult intraDataOffset

Detailed Description

For a memref with offset, sizes and strides, returns the offset, size, and potentially the size padded at the front to use for the linearized memref.

  • If the linearization is done for emulating load/stores of element type with bitwidth srcBits using element type with bitwidth dstBits, the linearized offset and size are scaled down by dstBits/srcBits.
  • If indices is provided, it represents the position in the original memref being accessed. The method then returns the index to use in the linearized memref. The linearized index is also scaled down by dstBits/srcBits. If indices is not provided 0, is returned for the linearized index.
  • If the size of the load/store is smaller than the linearized memref load/store, the memory region emulated is larger than the actual memory region needed. intraDataOffset returns the element offset of the data relevant at the beginning.
  • sizeDivKind selects floor vs ceil rounding for the linearizedSize contribution from each dimension (see LinearizedDivKind).

Definition at line 64 of file MemRefUtils.h.

Member Data Documentation

◆ intraDataOffset

OpFoldResult mlir::memref::LinearizedMemRefInfo::intraDataOffset

Definition at line 67 of file MemRefUtils.h.

Referenced by convertCastingOp().

◆ linearizedOffset

OpFoldResult mlir::memref::LinearizedMemRefInfo::linearizedOffset

Definition at line 65 of file MemRefUtils.h.

Referenced by convertCastingOp(), and getFlattenMemrefAndOffset().

◆ linearizedSize

OpFoldResult mlir::memref::LinearizedMemRefInfo::linearizedSize

Definition at line 66 of file MemRefUtils.h.

Referenced by convertCastingOp().


The documentation for this struct was generated from the following file: