Skip to main content

ptx_parser/type/instruction/
dp4a.rs

1//! Original PTX specification:
2//!
3//! dp4a.atype.btype  d, a, b, c;
4//! .atype = .btype = { .u32, .s32 };
5
6#![allow(unused)]
7use crate::r#type::common::*;
8
9pub mod section_0 {
10    use crate::Spanned;
11    use crate::parser::Span;
12    use crate::r#type::common::*;
13
14    use serde::Serialize;
15
16    #[derive(Debug, Clone, PartialEq, Serialize)]
17    pub enum Atype {
18        U32, // .u32
19        S32, // .s32
20    }
21
22    #[derive(Debug, Clone, PartialEq, Serialize)]
23    pub enum Btype {
24        U32, // .u32
25        S32, // .s32
26    }
27
28    #[derive(Debug, Clone, PartialEq, Spanned, Serialize)]
29    pub struct Dp4aAtypeBtype {
30        pub atype: Atype,      // .atype
31        pub btype: Btype,      // .btype
32        pub d: GeneralOperand, // d
33        pub a: GeneralOperand, // a
34        pub b: GeneralOperand, // b
35        pub c: GeneralOperand, // c
36        pub span: Span,
37    }
38}
39
40// Re-export types with section suffixes to avoid naming conflicts
41// e.g., Type0 for section_0::Type, Type1 for section_1::Type
42pub use section_0::Atype as Atype0;
43pub use section_0::Btype as Btype0;
44pub use section_0::Dp4aAtypeBtype;