1#pragma once
2
3#ifndef _TRITON_IR_CONTEXT_IMPL_H_
4#define _TRITON_IR_CONTEXT_IMPL_H_
5
6#include "triton/ir/type.h"
7#include "triton/ir/constant.h"
8#include <map>
9#include <memory>
10
11namespace triton{
12namespace ir{
13
14class context;
15
16/* Context impl */
17class context_impl {
18public:
19 // constructors
20 context_impl(context &ctx);
21
22public:
23 // non-numeric types
24 type void_ty, label_ty;
25 // floating point types
26 type fp8_ty, fp16_ty, bf16_ty, fp32_ty, fp64_ty;
27 // integer types
28 integer_type int1_ty, int8_ty, int16_ty, int32_ty, int64_ty, int128_ty;
29 // Pointer types
30 std::map<std::pair<type*, unsigned>, std::unique_ptr<pointer_type>> ptr_tys;
31 // Block types
32 std::map<std::pair<type*, type::block_shapes_t>, std::unique_ptr<block_type>> block_tys;
33 // Struct types
34 std::map<type::contained_tys_vec_t, struct_type*> struct_tys;
35 // Int constants
36 std::map<std::pair<type*, uint64_t>, std::unique_ptr<constant_int>> int_constants_;
37 // Float constants
38 std::map<std::pair<type*, double>, std::unique_ptr<constant_fp>> fp_constants_;
39 // undef values
40 std::map<type*, std::unique_ptr<undef_value>> uv_constants_;
41
42};
43
44}
45}
46
47#endif
48