1#include "triton/ir/context_impl.h"
2#include "triton/ir/context.h"
3#include "triton/ir/type.h"
4
5namespace triton{
6namespace ir{
7
8//===----------------------------------------------------------------------===//
9// context implementation
10//===----------------------------------------------------------------------===//
11
12context_impl::context_impl(context &ctx)
13 : void_ty(ctx, type::VoidTyID),
14 label_ty(ctx, type::LabelTyID),
15 // floating point
16 fp8_ty(ctx, type::FP8TyID),
17 fp16_ty(ctx, type::FP16TyID),
18 bf16_ty(ctx, type::BF16TyID),
19 fp32_ty(ctx, type::FP32TyID),
20 fp64_ty(ctx, type::FP64TyID),
21 // integers
22 int1_ty(ctx, 1),
23 int8_ty(ctx, 8),
24 int16_ty(ctx, 16),
25 int32_ty(ctx, 32),
26 int64_ty(ctx, 64),
27 int128_ty(ctx, 128) {}
28
29//===----------------------------------------------------------------------===//
30// context
31//===----------------------------------------------------------------------===//
32
33context::context():
34 p_impl(std::make_shared<context_impl>(*this)) {
35
36}
37
38
39}
40}
41