builtin.hpp 721 Bytes
Newer Older
Paul's avatar
Paul committed
1
2
3
#ifndef RTG_GUARD_BUILTIN_HPP
#define RTG_GUARD_BUILTIN_HPP

Paul's avatar
Paul committed
4
5
#include <rtg/operand.hpp>

Paul's avatar
Paul committed
6
7
8
9
namespace rtg {

namespace builtin {

Paul's avatar
Paul committed
10
11
12
13
14
15
struct literal
{
    std::string name() const
    {
        return "@literal";
    }
Paul's avatar
Paul committed
16
    shape compute_shape(std::vector<shape>) const
Paul's avatar
Paul committed
17
18
19
    {
        throw "builtin"; 
    }
Paul's avatar
Paul committed
20
    argument compute(std::vector<argument>) const
Paul's avatar
Paul committed
21
22
23
24
25
26
27
28
29
30
31
32
    {
        throw "builtin";
    }
};

struct param
{
    std::string parameter;
    std::string name() const
    {
        return "@param:" + parameter;
    }
Paul's avatar
Paul committed
33
    shape compute_shape(std::vector<shape>) const
Paul's avatar
Paul committed
34
35
36
    {
        throw "builtin"; 
    }
Paul's avatar
Paul committed
37
    argument compute(std::vector<argument>) const
Paul's avatar
Paul committed
38
39
40
41
    {
        throw "builtin";
    }
};
Paul's avatar
Paul committed
42
43
44
45
46
47

}

} // namespace rtg

#endif