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

The affine Plugin More...

Namespaces

namespace  phase

Enumerations

<tt>affine.For</tt>
enum class  For : flags_t
<tt>affine.Index</tt>
enum class  Index : flags_t
<tt>affine.lit</tt>
enum class  lit : flags_t
<tt>affine.semiop</tt>
enum class  semiop : flags_t {
  mul = 0x871ca3c60000300 ,
  ceildiv = 0x871ca3c60000301 ,
  floordiv = 0x871ca3c60000302 ,
  rem = 0x871ca3c60000303
}
<tt>affine.op</tt>
enum class  op : flags_t {
  add = 0x871ca3c60000400 ,
  sub = 0x871ca3c60000401 ,
  neg = 0x871ca3c60000402 ,
  mul = 0x871ca3c60000403
}
<tt>affine.map</tt>
enum class  map : flags_t
<tt>affine.id</tt>
enum class  id : flags_t
<tt>affine.linearize</tt>
enum class  linearize : flags_t
<tt>affine.delinearize</tt>
enum class  delinearize : flags_t
<tt>affine.lower_for</tt>
enum class  lower_for : flags_t
<tt>affine.lower_index</tt>
enum class  lower_index : flags_t

Functions

std::pair< Lam *, const Def * > counting_for (const Def *bound, const Def *acc, const Def *exit, Sym name)
 affine.For (0, bound, 1, acc) over a fresh body: Cn [I64, acc_t, Cn acc_t] named name.
DefVec counting_nest (Lam *&cur, const Def *&exit, const Def *&acc, Defs dims, std::string_view name)
 Nests one counting loop per bound of dims inside cur, threading cur, exit and acc down to the innermost body;.

Variables

static constexpr plugin_t Plugin_Id = 0x871ca3c60000000

Detailed Description

Enumeration Type Documentation

◆ delinearize

Definition at line 78 of file autogen.h.

◆ For

enum class mim::plug::affine::For : flags_t
strong

Definition at line 14 of file autogen.h.

◆ id

enum class mim::plug::affine::id : flags_t
strong

Definition at line 64 of file autogen.h.

◆ Index

enum class mim::plug::affine::Index : flags_t
strong

Definition at line 21 of file autogen.h.

◆ linearize

Definition at line 71 of file autogen.h.

◆ lit

enum class mim::plug::affine::lit : flags_t
strong

Definition at line 28 of file autogen.h.

◆ lower_for

Definition at line 85 of file autogen.h.

◆ lower_index

Definition at line 92 of file autogen.h.

◆ map

enum class mim::plug::affine::map : flags_t
strong

Definition at line 57 of file autogen.h.

◆ op

enum class mim::plug::affine::op : flags_t
strong
Enumerator
add 
sub 
neg 
mul 

Definition at line 46 of file autogen.h.

◆ semiop

enum class mim::plug::affine::semiop : flags_t
strong
Enumerator
mul 
ceildiv 
floordiv 
rem 

Definition at line 35 of file autogen.h.

Function Documentation

◆ counting_for()

std::pair< Lam *, const Def * > mim::plug::affine::counting_for ( const Def * bound,
const Def * acc,
const Def * exit,
Sym name )
inline

affine.For (0, bound, 1, acc) over a fresh body: Cn [I64, acc_t, Cn acc_t] named name.

Returns
{body, for_call}.

Definition at line 14 of file affine.h.

References counting_for(), mim::Def::type(), and mim::Def::world().

Referenced by counting_for(), and counting_nest().

◆ counting_nest()

DefVec mim::plug::affine::counting_nest ( Lam *& cur,
const Def *& exit,
const Def *& acc,
Defs dims,
std::string_view name )
inline

Nests one counting loop per bound of dims inside cur, threading cur, exit and acc down to the innermost body;.

Returns
the raw i64 loop counters.

Definition at line 24 of file affine.h.

References counting_for(), counting_nest(), mim::Lam::set(), and mim::Def::world().

Referenced by mim::plug::btensor::build_pointwise(), and counting_nest().

Variable Documentation

◆ Plugin_Id

plugin_t mim::plug::affine::Plugin_Id = 0x871ca3c60000000
staticconstexpr

Definition at line 10 of file autogen.h.