#![allow(unused)]
use crate::lexer::PtxToken;
use crate::unparser::{PtxUnparser, common::*};
pub mod section_0 {
use super::*;
use crate::r#type::instruction::mbarrier_arrive::section_0::*;
impl PtxUnparser for MbarrierArriveSemScopeStateB64 {
fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
push_opcode(tokens, "mbarrier");
push_directive(tokens, "arrive");
if let Some(sem_0) = self.sem.as_ref() {
match sem_0 {
Sem::Release => {
push_directive(tokens, "release");
}
Sem::Relaxed => {
push_directive(tokens, "relaxed");
}
}
}
if let Some(scope_1) = self.scope.as_ref() {
match scope_1 {
Scope::Cluster => {
push_directive(tokens, "cluster");
}
Scope::Cta => {
push_directive(tokens, "cta");
}
}
}
if let Some(state_2) = self.state.as_ref() {
match state_2 {
State::SharedCta => {
push_directive(tokens, "shared::cta");
}
State::Shared => {
push_directive(tokens, "shared");
}
}
}
push_directive(tokens, "b64");
self.state2.unparse_tokens(tokens);
tokens.push(PtxToken::Comma);
self.addr.unparse_tokens(tokens);
if self.count.is_some() {
tokens.push(PtxToken::Comma);
}
if let Some(opt_3) = self.count.as_ref() {
opt_3.unparse_tokens(tokens);
}
tokens.push(PtxToken::Semicolon);
}
}
impl PtxUnparser for MbarrierArriveSemScopeSharedClusterB64 {
fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
push_opcode(tokens, "mbarrier");
push_directive(tokens, "arrive");
if let Some(sem_4) = self.sem.as_ref() {
match sem_4 {
Sem::Release => {
push_directive(tokens, "release");
}
Sem::Relaxed => {
push_directive(tokens, "relaxed");
}
}
}
if let Some(scope_5) = self.scope.as_ref() {
match scope_5 {
Scope::Cluster => {
push_directive(tokens, "cluster");
}
Scope::Cta => {
push_directive(tokens, "cta");
}
}
}
if self.shared_cluster {
push_directive(tokens, "shared::cluster");
}
push_directive(tokens, "b64");
self.operand.unparse_tokens(tokens);
tokens.push(PtxToken::Comma);
self.addr.unparse_tokens(tokens);
if self.count.is_some() {
tokens.push(PtxToken::Comma);
}
if let Some(opt_6) = self.count.as_ref() {
opt_6.unparse_tokens(tokens);
}
tokens.push(PtxToken::Semicolon);
}
}
impl PtxUnparser for MbarrierArriveExpectTxSemScopeStateB64 {
fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
push_opcode(tokens, "mbarrier");
push_directive(tokens, "arrive");
push_directive(tokens, "expect_tx");
if let Some(sem_7) = self.sem.as_ref() {
match sem_7 {
Sem::Release => {
push_directive(tokens, "release");
}
Sem::Relaxed => {
push_directive(tokens, "relaxed");
}
}
}
if let Some(scope_8) = self.scope.as_ref() {
match scope_8 {
Scope::Cluster => {
push_directive(tokens, "cluster");
}
Scope::Cta => {
push_directive(tokens, "cta");
}
}
}
if let Some(state_9) = self.state.as_ref() {
match state_9 {
State::SharedCta => {
push_directive(tokens, "shared::cta");
}
State::Shared => {
push_directive(tokens, "shared");
}
}
}
push_directive(tokens, "b64");
self.state2.unparse_tokens(tokens);
tokens.push(PtxToken::Comma);
self.addr.unparse_tokens(tokens);
tokens.push(PtxToken::Comma);
self.txcount.unparse_tokens(tokens);
tokens.push(PtxToken::Semicolon);
}
}
impl PtxUnparser for MbarrierArriveExpectTxSemScopeSharedClusterB64 {
fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
push_opcode(tokens, "mbarrier");
push_directive(tokens, "arrive");
push_directive(tokens, "expect_tx");
if let Some(sem_10) = self.sem.as_ref() {
match sem_10 {
Sem::Release => {
push_directive(tokens, "release");
}
Sem::Relaxed => {
push_directive(tokens, "relaxed");
}
}
}
if let Some(scope_11) = self.scope.as_ref() {
match scope_11 {
Scope::Cluster => {
push_directive(tokens, "cluster");
}
Scope::Cta => {
push_directive(tokens, "cta");
}
}
}
if self.shared_cluster {
push_directive(tokens, "shared::cluster");
}
push_directive(tokens, "b64");
self.operand.unparse_tokens(tokens);
tokens.push(PtxToken::Comma);
self.addr.unparse_tokens(tokens);
tokens.push(PtxToken::Comma);
self.txcount.unparse_tokens(tokens);
tokens.push(PtxToken::Semicolon);
}
}
impl PtxUnparser for MbarrierArriveNocompleteReleaseCtaStateB64 {
fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
push_opcode(tokens, "mbarrier");
push_directive(tokens, "arrive");
push_directive(tokens, "noComplete");
if self.release {
push_directive(tokens, "release");
}
if self.cta {
push_directive(tokens, "cta");
}
if let Some(state_12) = self.state.as_ref() {
match state_12 {
State::SharedCta => {
push_directive(tokens, "shared::cta");
}
State::Shared => {
push_directive(tokens, "shared");
}
}
}
push_directive(tokens, "b64");
self.state2.unparse_tokens(tokens);
tokens.push(PtxToken::Comma);
self.addr.unparse_tokens(tokens);
tokens.push(PtxToken::Comma);
self.count.unparse_tokens(tokens);
tokens.push(PtxToken::Semicolon);
}
}
}