ptx_parser/unparser/instruction/
brx_idx.rs

1//! Original PTX specification:
2//!
3//! brx.idx{.uni} index, tlist;
4//! brx.idx{.uni} index, tlist;
5
6#![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::brx_idx::section_0::*;
14
15    impl PtxUnparser for BrxIdxUni {
16        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
17            push_opcode(tokens, "brx");
18            push_directive(tokens, "idx");
19            if self.uni {
20                push_directive(tokens, "uni");
21            }
22            self.index.unparse_tokens(tokens);
23            tokens.push(PtxToken::Comma);
24            self.tlist.unparse_tokens(tokens);
25            tokens.push(PtxToken::Semicolon);
26        }
27    }
28
29    impl PtxUnparser for BrxIdxUni1 {
30        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
31            push_opcode(tokens, "brx");
32            push_directive(tokens, "idx");
33            if self.uni {
34                push_directive(tokens, "uni");
35            }
36            self.index.unparse_tokens(tokens);
37            tokens.push(PtxToken::Comma);
38            self.tlist.unparse_tokens(tokens);
39            tokens.push(PtxToken::Semicolon);
40        }
41    }
42}