ptx_parser/unparser/instruction/
applypriority.rs

1//! Original PTX specification:
2//!
3//! applypriority{.global}.level::eviction_priority  [a], size;
4//! .level::eviction_priority = { .L2::evict_normal };
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::applypriority::section_0::*;
14
15    impl PtxUnparser for ApplypriorityGlobalLevelEvictionPriority {
16        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
17            push_opcode(tokens, "applypriority");
18                    if self.global {
19                            push_directive(tokens, "global");
20                    }
21                    match &self.level_eviction_priority {
22                            LevelEvictionPriority::L2EvictNormal => {
23                                    push_directive(tokens, "L2::evict_normal");
24                            }
25                    }
26                    self.a.unparse_tokens(tokens);
27            tokens.push(PtxToken::Comma);
28                    self.size.unparse_tokens(tokens);
29            tokens.push(PtxToken::Semicolon);
30        }
31    }
32
33}
34