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
//! Original PTX specification:
//!
//! mbarrier.complete_tx{.sem}{.scope}{.space}.b64 [addr], txCount;
//! .sem = { .relaxed };
//! .scope = { .cta, .cluster };
//! .space = { .shared, .shared::cta, .shared::cluster };
#![allow(unused)]
use crate::lexer::PtxToken;
use crate::unparser::{PtxUnparser, common::*};
pub mod section_0 {
use super::*;
use crate::r#type::instruction::mbarrier_complete_tx::section_0::*;
impl PtxUnparser for MbarrierCompleteTxSemScopeSpaceB64 {
fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
push_opcode(tokens, "mbarrier");
push_directive(tokens, "complete_tx");
if let Some(sem_0) = self.sem.as_ref() {
match sem_0 {
Sem::Relaxed => {
push_directive(tokens, "relaxed");
}
}
}
if let Some(scope_1) = self.scope.as_ref() {
match scope_1 {
Scope::Cluster => {
push_directive(tokens, "cluster");
}
Scope::Cta => {
push_directive(tokens, "cta");
}
}
}
if let Some(space_2) = self.space.as_ref() {
match space_2 {
Space::SharedCluster => {
push_directive(tokens, "shared::cluster");
}
Space::SharedCta => {
push_directive(tokens, "shared::cta");
}
Space::Shared => {
push_directive(tokens, "shared");
}
}
}
push_directive(tokens, "b64");
self.addr.unparse_tokens(tokens);
tokens.push(PtxToken::Comma);
self.txcount.unparse_tokens(tokens);
tokens.push(PtxToken::Semicolon);
}
}
}