MLIR 22.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.

Definition at line 50 of file MemRefUtils.h.

Member Data Documentation

◆ intraDataOffset

OpFoldResult mlir::memref::LinearizedMemRefInfo::intraDataOffset

Definition at line 53 of file MemRefUtils.h.

◆ linearizedOffset

OpFoldResult mlir::memref::LinearizedMemRefInfo::linearizedOffset

Definition at line 51 of file MemRefUtils.h.

Referenced by getFlattenMemrefAndOffset().

◆ linearizedSize

OpFoldResult mlir::memref::LinearizedMemRefInfo::linearizedSize

Definition at line 52 of file MemRefUtils.h.


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