MimIR
0.1
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
affine.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
mim/world.h
"
4
5
#include "
mim/plug/affine/autogen.h
"
6
7
namespace
mim::plug::affine
{
8
9
/// @name %%affine.For
10
/// Returns the affine_for axiom applied with \a params.
11
/// See documentation for %affine.For axiom in @ref affine.
12
///@{
13
inline
const
Def
*
fn_for
(
World
& w,
Defs
params) {
14
return
w.app(w.annex<
affine::For
>(), {w.lit_i32(), w.lit_nat(params.size()), w.tuple(params)});
15
}
16
17
/// Returns a fully applied affine_for axiom.
18
/// See documentation for %affine.For axiom in @ref affine.
19
inline
const
Def
*
20
op_for
(
World
& w,
const
Def
* begin,
const
Def
* end,
const
Def
* step,
Defs
inits,
const
Def
* body,
const
Def
* brk) {
21
auto
types =
DefVec
(inits.size(), [&](
size_t
i) { return inits[i]->type(); });
22
return
w.app(
fn_for
(w, types), {begin, end, step, w.tuple(inits), body, brk});
23
}
24
///@}
25
26
}
// namespace mim::plug::affine
autogen.h
mim::Def
Base class for all Defs.
Definition
def.h:198
mim::World
The World represents the whole program and manages creation of MimIR nodes (Defs).
Definition
world.h:33
mim::plug::affine
The affine Plugin
Definition
affine.h:7
mim::plug::affine::For
For
Definition
autogen.h:14
mim::plug::affine::op_for
const Def * op_for(World &w, const Def *begin, const Def *end, const Def *step, Defs inits, const Def *body, const Def *brk)
Returns a fully applied affine_for axiom.
Definition
affine.h:20
mim::plug::affine::fn_for
const Def * fn_for(World &w, Defs params)
Definition
affine.h:13
mim::Defs
View< const Def * > Defs
Definition
def.h:49
mim::DefVec
Vector< const Def * > DefVec
Definition
def.h:50
world.h
include
mim
plug
affine
affine.h
Generated by
1.13.2