ptx_parser/parser/instruction/
wgmma_wait_group.rs

1//! Original PTX specification:
2//!
3//! wgmma.wait_group.sync.aligned N;
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::wgmma_wait_group::section_0::*;
14
15    impl PtxParser for WgmmaWaitGroupSyncAligned {
16        fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
17            stream.expect_string("wgmma")?;
18            stream.expect_string(".wait_group")?;
19            let wait_group = ();
20            stream.expect_complete()?;
21            stream.expect_string(".sync")?;
22            let sync = ();
23            stream.expect_complete()?;
24            stream.expect_string(".aligned")?;
25            let aligned = ();
26            stream.expect_complete()?;
27            let n = GeneralOperand::parse(stream)?;
28            stream.expect_complete()?;
29            stream.expect_complete()?;
30            stream.expect(&PtxToken::Semicolon)?;
31            Ok(WgmmaWaitGroupSyncAligned {
32                wait_group,
33                sync,
34                aligned,
35                n,
36            })
37        }
38    }
39
40
41}
42