builtin.hpp 644 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
struct literal
{
Paul's avatar
Paul committed
12
13
14
    std::string name() const { return "@literal"; }
    shape compute_shape(std::vector<shape>) const { throw "builtin"; }
    argument compute(std::vector<argument>) const { throw "builtin"; }
Paul's avatar
Paul committed
15
16
17
18
19
};

struct param
{
    std::string parameter;
Paul's avatar
Paul committed
20
21
22
    std::string name() const { return "@param:" + parameter; }
    shape compute_shape(std::vector<shape>) const { throw "builtin"; }
    argument compute(std::vector<argument>) const { throw "builtin"; }
Paul's avatar
Paul committed
23
};
Paul's avatar
Paul committed
24

Paul's avatar
Paul committed
25
} // namespace builtin
Paul's avatar
Paul committed
26
27
28
29

} // namespace rtg

#endif