ptx_parser/unparser/instruction/
pmevent.rs1#![allow(unused)]
7
8use crate::lexer::PtxToken;
9use crate::unparser::{PtxUnparser, common::*};
10
11pub mod section_0 {
12 use super::*;
13 use crate::r#type::instruction::pmevent::section_0::*;
14
15 impl PtxUnparser for Pmevent {
16 fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
17 self.unparse_tokens_mode(tokens, false);
18 }
19 fn unparse_tokens_mode(&self, tokens: &mut ::std::vec::Vec<PtxToken>, spaced: bool) {
20 push_opcode(tokens, "pmevent");
21 if spaced {
22 tokens.push(PtxToken::Space);
23 }
24 self.a.unparse_tokens_mode(tokens, spaced);
25 tokens.push(PtxToken::Semicolon);
26 if spaced {
27 tokens.push(PtxToken::Newline);
28 }
29 }
30 }
31
32 impl PtxUnparser for PmeventMask {
33 fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
34 self.unparse_tokens_mode(tokens, false);
35 }
36 fn unparse_tokens_mode(&self, tokens: &mut ::std::vec::Vec<PtxToken>, spaced: bool) {
37 push_opcode(tokens, "pmevent");
38 push_directive(tokens, "mask");
39 if spaced {
40 tokens.push(PtxToken::Space);
41 }
42 self.a.unparse_tokens_mode(tokens, spaced);
43 tokens.push(PtxToken::Semicolon);
44 if spaced {
45 tokens.push(PtxToken::Newline);
46 }
47 }
48 }
49}