Skip to main content

ptx_parser/unparser/instruction/
mbarrier_pending_count.rs

1//! Original PTX specification:
2//!
3//! mbarrier.pending_count.b64 count, state;
4
5#![allow(unused)]
6
7use crate::lexer::PtxToken;
8use crate::unparser::{PtxUnparser, common::*};
9
10pub mod section_0 {
11    use super::*;
12    use crate::r#type::instruction::mbarrier_pending_count::section_0::*;
13
14    impl PtxUnparser for MbarrierPendingCountB64 {
15        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
16            self.unparse_tokens_mode(tokens, false);
17        }
18        fn unparse_tokens_mode(&self, tokens: &mut ::std::vec::Vec<PtxToken>, spaced: bool) {
19            push_opcode(tokens, "mbarrier");
20            push_directive(tokens, "pending_count");
21            push_directive(tokens, "b64");
22            if spaced {
23                tokens.push(PtxToken::Space);
24            }
25            self.count.unparse_tokens_mode(tokens, spaced);
26            tokens.push(PtxToken::Comma);
27            if spaced {
28                tokens.push(PtxToken::Space);
29            }
30            self.state.unparse_tokens_mode(tokens, spaced);
31            tokens.push(PtxToken::Semicolon);
32            if spaced {
33                tokens.push(PtxToken::Newline);
34            }
35        }
36    }
37}