ptx_parser/parser/instruction/
bar_warp_sync.rs

1//! Original PTX specification:
2//!
3//! bar.warp.sync      membermask;
4
5#![allow(unused)]
6
7use crate::lexer::PtxToken;
8use crate::parser::{PtxParseError, PtxParser, PtxTokenStream, Span};
9use crate::r#type::common::*;
10
11pub mod section_0 {
12    use super::*;
13    use crate::r#type::instruction::bar_warp_sync::section_0::*;
14
15    impl PtxParser for BarWarpSync {
16        fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
17            stream.expect_string("bar")?;
18            stream.expect_string(".warp")?;
19            let warp = ();
20            stream.expect_complete()?;
21            stream.expect_string(".sync")?;
22            let sync = ();
23            stream.expect_complete()?;
24            let membermask = GeneralOperand::parse(stream)?;
25            stream.expect_complete()?;
26            stream.expect_complete()?;
27            stream.expect(&PtxToken::Semicolon)?;
28            Ok(BarWarpSync {
29                warp,
30                sync,
31                membermask,
32            })
33        }
34    }
35
36
37}
38