ptx_parser/unparser/instruction/
getctarank.rs1#![allow(unused)]
16
17use crate::lexer::PtxToken;
18use crate::unparser::{PtxUnparser, common::*};
19
20pub mod section_0 {
21 use super::*;
22 use crate::r#type::instruction::getctarank::section_0::*;
23
24 impl PtxUnparser for GetctarankSpaceType {
25 fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
26 push_opcode(tokens, "getctarank");
27 if let Some(space_0) = self.space.as_ref() {
28 match space_0 {
29 Space::SharedCluster => {
30 push_directive(tokens, "shared::cluster");
31 }
32 }
33 }
34 match &self.type_ {
35 Type::U32 => {
36 push_directive(tokens, "u32");
37 }
38 Type::U64 => {
39 push_directive(tokens, "u64");
40 }
41 }
42 self.d.unparse_tokens(tokens);
43 tokens.push(PtxToken::Comma);
44 self.a.unparse_tokens(tokens);
45 tokens.push(PtxToken::Semicolon);
46 }
47 }
48
49 impl PtxUnparser for GetctarankSharedClusterType {
50 fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
51 push_opcode(tokens, "getctarank");
52 push_directive(tokens, "shared::cluster");
53 match &self.type_ {
54 Type::U32 => {
55 push_directive(tokens, "u32");
56 }
57 Type::U64 => {
58 push_directive(tokens, "u64");
59 }
60 }
61 self.d.unparse_tokens(tokens);
62 tokens.push(PtxToken::Comma);
63 self.a.unparse_tokens(tokens);
64 tokens.push(PtxToken::Semicolon);
65 }
66 }
67
68 impl PtxUnparser for GetctarankType {
69 fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
70 push_opcode(tokens, "getctarank");
71 match &self.type_ {
72 Type::U32 => {
73 push_directive(tokens, "u32");
74 }
75 Type::U64 => {
76 push_directive(tokens, "u64");
77 }
78 }
79 self.d.unparse_tokens(tokens);
80 tokens.push(PtxToken::Comma);
81 self.a.unparse_tokens(tokens);
82 tokens.push(PtxToken::Semicolon);
83 }
84 }
85}