MimIR
0.2-dev
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
tensor.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
mim/world.h
>
4
5
#include "
mim/plug/tensor/autogen.h
"
6
7
namespace
mim::plug::tensor
{
8
9
inline
const
Def
*
op_get
(
const
Def
* T,
const
Def
* r,
const
Def
* s,
const
Def
* arr,
const
Def
* index) {
10
auto
& w = arr->
world
();
11
auto
f = w.annex<
tensor::get
>();
12
f = w.app(f, {T, r, s});
13
f = w.app(f, {arr, index});
14
return
f;
15
}
16
17
inline
const
Def
*
op_set
(
const
Def
* T,
const
Def
* r,
const
Def
* s,
const
Def
* arr,
const
Def
* index,
const
Def
* x) {
18
auto
& w = arr->
world
();
19
auto
f = w.app(w.annex<
tensor::set
>(), {T, r, s});
20
f = w.app(f, {arr, index, x});
21
return
f;
22
}
23
24
}
// namespace mim::plug::tensor
mim::Def
Base class for all Defs.
Definition
def.h:246
mim::Def::world
World & world() const noexcept
Definition
def.cpp:444
mim::plug::tensor
The tensor Plugin
Definition
fuse.h:5
mim::plug::tensor::op_set
const Def * op_set(const Def *T, const Def *r, const Def *s, const Def *arr, const Def *index, const Def *x)
Definition
tensor.h:17
mim::plug::tensor::set
set
Definition
autogen.h:29
mim::plug::tensor::op_get
const Def * op_get(const Def *T, const Def *r, const Def *s, const Def *arr, const Def *index)
Definition
tensor.h:9
mim::plug::tensor::get
get
Definition
autogen.h:21
autogen.h
world.h
include
mim
plug
tensor
tensor.h
Generated by
1.16.1