ptx_parser/parser/instruction/
mbarrier_pending_count.rs1#![allow(unused)]
6
7use crate::parser::{
8 PtxParseError, PtxParser, PtxTokenStream, Span,
9 util::{
10 between, comma_p, directive_p, exclamation_p, lbracket_p, lparen_p, map, minus_p, optional,
11 pipe_p, rbracket_p, rparen_p, semicolon_p, sep_by, string_p, try_map,
12 },
13};
14use crate::r#type::common::*;
15use crate::{alt, ok, seq_n};
16
17pub mod section_0 {
18 use super::*;
19 use crate::r#type::instruction::mbarrier_pending_count::section_0::*;
20
21 impl PtxParser for MbarrierPendingCountB64 {
22 fn parse() -> impl Fn(&mut PtxTokenStream) -> Result<(Self, Span), PtxParseError> {
23 try_map(
24 seq_n!(
25 string_p("mbarrier"),
26 string_p(".pending_count"),
27 string_p(".b64"),
28 GeneralOperand::parse(),
29 comma_p(),
30 GeneralOperand::parse(),
31 semicolon_p()
32 ),
33 |(_, pending_count, b64, count, _, state, _), span| {
34 ok!(MbarrierPendingCountB64 {
35 pending_count = pending_count,
36 b64 = b64,
37 count = count,
38 state = state,
39
40 })
41 },
42 )
43 }
44 }
45}