1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
//! Original PTX specification:
//!
//! barrier{.cta}.sync{.aligned} a{, b};
//! barrier{.cta}.arrive{.aligned} a, b;
//! barrier{.cta}.red.popc{.aligned}.u32 d, a{, b}, {!}c;
//! barrier{.cta}.red.op{.aligned}.pred p, a{, b}, {!}c;
//! bar{.cta}.sync a{, b};
//! bar{.cta}.arrive a, b;
//! bar{.cta}.red.popc.u32 d, a{, b}, {!}c;
//! bar{.cta}.red.op.pred p, a{, b}, {!}c;
//! .op = { .and, .or };
#![allow(unused)]
use crate::r#type::common::*;
pub mod section_0 {
use crate::Spanned;
use crate::parser::Span;
use crate::r#type::common::*;
use serde::Serialize;
#[derive(Debug, Clone, PartialEq, Serialize)]
pub enum Op {
And, // .and
Or, // .or
}
#[derive(Debug, Clone, PartialEq, Spanned, Serialize)]
pub struct BarrierCtaSyncAligned {
pub cta: bool, // {.cta}
pub sync: (), // .sync
pub aligned: bool, // {.aligned}
pub a: GeneralOperand, // a
pub b: Option<GeneralOperand>, // {, b}
pub span: Span,
}
#[derive(Debug, Clone, PartialEq, Spanned, Serialize)]
pub struct BarrierCtaArriveAligned {
pub cta: bool, // {.cta}
pub arrive: (), // .arrive
pub aligned: bool, // {.aligned}
pub a: GeneralOperand, // a
pub b: GeneralOperand, // b
pub span: Span,
}
#[derive(Debug, Clone, PartialEq, Spanned, Serialize)]
pub struct BarrierCtaRedPopcAlignedU32 {
pub cta: bool, // {.cta}
pub red: (), // .red
pub popc: (), // .popc
pub aligned: bool, // {.aligned}
pub u32: (), // .u32
pub d: GeneralOperand, // d
pub a: GeneralOperand, // a
pub b: Option<GeneralOperand>, // {, b}
pub c_op: bool, // {!} operator
pub c: GeneralOperand, // {!}c
pub span: Span,
}
#[derive(Debug, Clone, PartialEq, Spanned, Serialize)]
pub struct BarrierCtaRedOpAlignedPred {
pub cta: bool, // {.cta}
pub red: (), // .red
pub op: Op, // .op
pub aligned: bool, // {.aligned}
pub pred: (), // .pred
pub p: GeneralOperand, // p
pub a: GeneralOperand, // a
pub b: Option<GeneralOperand>, // {, b}
pub c_op: bool, // {!} operator
pub c: GeneralOperand, // {!}c
pub span: Span,
}
#[derive(Debug, Clone, PartialEq, Spanned, Serialize)]
pub struct BarCtaSync {
pub cta: bool, // {.cta}
pub sync: (), // .sync
pub a: GeneralOperand, // a
pub b: Option<GeneralOperand>, // {, b}
pub span: Span,
}
#[derive(Debug, Clone, PartialEq, Spanned, Serialize)]
pub struct BarCtaArrive {
pub cta: bool, // {.cta}
pub arrive: (), // .arrive
pub a: GeneralOperand, // a
pub b: GeneralOperand, // b
pub span: Span,
}
#[derive(Debug, Clone, PartialEq, Spanned, Serialize)]
pub struct BarCtaRedPopcU32 {
pub cta: bool, // {.cta}
pub red: (), // .red
pub popc: (), // .popc
pub u32: (), // .u32
pub d: GeneralOperand, // d
pub a: GeneralOperand, // a
pub b: Option<GeneralOperand>, // {, b}
pub c_op: bool, // {!} operator
pub c: GeneralOperand, // {!}c
pub span: Span,
}
#[derive(Debug, Clone, PartialEq, Spanned, Serialize)]
pub struct BarCtaRedOpPred {
pub cta: bool, // {.cta}
pub red: (), // .red
pub op: Op, // .op
pub pred: (), // .pred
pub p: GeneralOperand, // p
pub a: GeneralOperand, // a
pub b: Option<GeneralOperand>, // {, b}
pub c_op: bool, // {!} operator
pub c: GeneralOperand, // {!}c
pub span: Span,
}
}
// Re-export types with section suffixes to avoid naming conflicts
// e.g., Type0 for section_0::Type, Type1 for section_1::Type
pub use section_0::BarCtaArrive;
pub use section_0::BarCtaRedOpPred;
pub use section_0::BarCtaRedPopcU32;
pub use section_0::BarCtaSync;
pub use section_0::BarrierCtaArriveAligned;
pub use section_0::BarrierCtaRedOpAlignedPred;
pub use section_0::BarrierCtaRedPopcAlignedU32;
pub use section_0::BarrierCtaSyncAligned;
pub use section_0::Op as Op0;