MimIR
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
mim::plug::buffer Namespace Reference

The buffer Plugin More...

Classes

class  LowerPtr
 Lowers the buffer abstraction to the low-level pointer representation. More...

Enumerations

%buffer.alloc
enum class  alloc : flags_t
%buffer.init
enum class  init : flags_t
%buffer.constant
enum class  constant : flags_t
%buffer.copy
enum class  copy : flags_t
%buffer.lower_ptr
enum class  lower_ptr : flags_t

Functions

const Deftype_buf (const Def *r, const Def *s, const Def *T)
 The buffer type buffer.Buf (r, s, T).
const Defop_alloc (const Def *r, const Def *s, const Def *T, const Def *mem)
 buffer.alloc (r, s, T) mem[mem.M 0, buffer.Buf (r, s, T)].
const Defop_read (const Def *r, const Def *s, const Def *T, const Def *mem, const Def *buf, const Def *idx)
 buffer.read (r, s, T) (mem, buf, idx)[mem.M 0, T].
const Defop_write (const Def *r, const Def *s, const Def *T, const Def *mem, const Def *buf, const Def *idx, const Def *val)
 buffer.write (r, s, T) (mem, buf, idx, val)[mem.M 0, buffer.Buf (r, s, T)].
const Defop_copy (const Def *r, const Def *s, const Def *T, const Def *mem, const Def *dst, const Def *src)
 buffer.copy (r, s, T) (mem, dst, src)mem.M 0 (copies the whole buffer src into dst).
const Defop_init (const Def *r, const Def *s, const Def *T, const Def *mem, const Def *val)
 buffer.init (r, s, T) (mem, val)[mem.M 0, buffer.Buf (r, s, T)] (initialised with the array value val).
const Defop_constant (const Def *r, const Def *s, const Def *T, const Def *mem, const Def *val)
 buffer.constant (r, s, T) (mem, val)[mem.M 0, buffer.Buf (r, s, T)] (every element initialised to val).
void reg_phases (Flags2Phases &phases)
void register_normalizers (Normalizers &normalizers)

Variables

static constexpr plugin_t Plugin_Id = 0xd61c71930000000

%buffer.Buf

enum class  Buf : flags_t
const Defnormalize_Buf (const Def *, const Def *callee, const Def *arg)
 Buf (r, s, T) with literal size-1 axes in sBuf (r', s', T) with those axes dropped.

%buffer.read

enum class  read : flags_t
const Defnormalize_read (const Def *type, const Def *, const Def *arg)
 read (constant v) idxv.

%buffer.write

enum class  write : flags_t
const Defnormalize_write (const Def *, const Def *, const Def *)

%buffer.shape

enum class  shape : flags_t
const Defnormalize_shape (const Def *type, const Def *, const Def *arg)
 shape buf i ↦ the i-th size, read off the buffer's type.

Detailed Description

Enumeration Type Documentation

◆ alloc

enum class mim::plug::buffer::alloc : flags_t
strong

Definition at line 22 of file autogen.h.

◆ Buf

enum class mim::plug::buffer::Buf : flags_t
strong

Definition at line 14 of file autogen.h.

◆ constant

enum class mim::plug::buffer::constant : flags_t
strong

Definition at line 52 of file autogen.h.

◆ copy

enum class mim::plug::buffer::copy : flags_t
strong

Definition at line 67 of file autogen.h.

◆ init

enum class mim::plug::buffer::init : flags_t
strong

Definition at line 45 of file autogen.h.

◆ lower_ptr

Definition at line 74 of file autogen.h.

◆ read

enum class mim::plug::buffer::read : flags_t
strong

Definition at line 29 of file autogen.h.

◆ shape

enum class mim::plug::buffer::shape : flags_t
strong

Definition at line 59 of file autogen.h.

◆ write

enum class mim::plug::buffer::write : flags_t
strong

Definition at line 37 of file autogen.h.

Function Documentation

◆ normalize_Buf()

const Def * mim::plug::buffer::normalize_Buf ( const Def * ,
const Def * callee,
const Def * arg )

Buf (r, s, T) with literal size-1 axes in sBuf (r', s', T) with those axes dropped.

This mirrors the folding of the corresponding array types («3, 1; T»«3; T»), so buffer types derived from logical shapes agree with the (folded) boundary types by construction.

Definition at line 12 of file normalizers.cpp.

References mim::Lit::isa(), mim::Def::projs(), and mim::Def::world().

◆ normalize_read()

const Def * mim::plug::buffer::normalize_read ( const Def * type,
const Def * ,
const Def * arg )

read (constant v) idxv.

Definition at line 30 of file normalizers.cpp.

References mim::Axm::isa(), and mim::Def::projs().

◆ normalize_shape()

const Def * mim::plug::buffer::normalize_shape ( const Def * type,
const Def * ,
const Def * arg )

shape buf i ↦ the i-th size, read off the buffer's type.

Definition at line 44 of file normalizers.cpp.

References mim::Axm::isa(), and mim::Def::projs().

◆ normalize_write()

const Def * mim::plug::buffer::normalize_write ( const Def * ,
const Def * ,
const Def *  )

Definition at line 41 of file normalizers.cpp.

◆ op_alloc()

const Def * mim::plug::buffer::op_alloc ( const Def * r,
const Def * s,
const Def * T,
const Def * mem )
inline

buffer.alloc (r, s, T) mem[mem.M 0, buffer.Buf (r, s, T)].

Definition at line 16 of file buffer.h.

Referenced by mim::plug::matrix::phase::LowerMatrixMediumLevel::rewrite_imm_App().

◆ op_constant()

const Def * mim::plug::buffer::op_constant ( const Def * r,
const Def * s,
const Def * T,
const Def * mem,
const Def * val )
inline

buffer.constant (r, s, T) (mem, val)[mem.M 0, buffer.Buf (r, s, T)] (every element initialised to val).

Definition at line 47 of file buffer.h.

◆ op_copy()

const Def * mim::plug::buffer::op_copy ( const Def * r,
const Def * s,
const Def * T,
const Def * mem,
const Def * dst,
const Def * src )
inline

buffer.copy (r, s, T) (mem, dst, src)mem.M 0 (copies the whole buffer src into dst).

Definition at line 35 of file buffer.h.

◆ op_init()

const Def * mim::plug::buffer::op_init ( const Def * r,
const Def * s,
const Def * T,
const Def * mem,
const Def * val )
inline

buffer.init (r, s, T) (mem, val)[mem.M 0, buffer.Buf (r, s, T)] (initialised with the array value val).

Definition at line 41 of file buffer.h.

◆ op_read()

const Def * mim::plug::buffer::op_read ( const Def * r,
const Def * s,
const Def * T,
const Def * mem,
const Def * buf,
const Def * idx )
inline

buffer.read (r, s, T) (mem, buf, idx)[mem.M 0, T].

Definition at line 22 of file buffer.h.

Referenced by mim::plug::matrix::op_read().

◆ op_write()

const Def * mim::plug::buffer::op_write ( const Def * r,
const Def * s,
const Def * T,
const Def * mem,
const Def * buf,
const Def * idx,
const Def * val )
inline

buffer.write (r, s, T) (mem, buf, idx, val)[mem.M 0, buffer.Buf (r, s, T)].

Definition at line 29 of file buffer.h.

Referenced by mim::plug::matrix::phase::LowerMatrixMediumLevel::rewrite_imm_App().

◆ reg_phases()

void mim::plug::buffer::reg_phases ( Flags2Phases & phases)

Definition at line 11 of file buffer.cpp.

References mim::Phase::hook().

Referenced by mim_get_plugin().

◆ register_normalizers()

void mim::plug::buffer::register_normalizers ( Normalizers & normalizers)

Referenced by mim_get_plugin().

◆ type_buf()

const Def * mim::plug::buffer::type_buf ( const Def * r,
const Def * s,
const Def * T )
inline

The buffer type buffer.Buf (r, s, T).

Definition at line 10 of file buffer.h.

Variable Documentation

◆ Plugin_Id

plugin_t mim::plug::buffer::Plugin_Id = 0xd61c71930000000
staticconstexpr

Definition at line 10 of file autogen.h.