Skip to main content

ptx_parser/type/instruction/
suq.rs

1//! Original PTX specification:
2//!
3//! suq.query.b32   d, [a];
4//! .query = { .width, .height, .depth,
5//! .channel_data_type, .channel_order,
6//! .array_size, .memory_layout };
7
8#![allow(unused)]
9use crate::r#type::common::*;
10
11pub mod section_0 {
12    use crate::Spanned;
13    use crate::parser::Span;
14    use crate::r#type::common::*;
15
16    use serde::Serialize;
17
18    #[derive(Debug, Clone, PartialEq, Serialize)]
19    pub enum Query {
20        ChannelDataType, // .channel_data_type
21        ChannelOrder,    // .channel_order
22        MemoryLayout,    // .memory_layout
23        ArraySize,       // .array_size
24        Height,          // .height
25        Width,           // .width
26        Depth,           // .depth
27    }
28
29    #[derive(Debug, Clone, PartialEq, Spanned, Serialize)]
30    pub struct SuqQueryB32 {
31        pub query: Query,      // .query
32        pub b32: (),           // .b32
33        pub d: GeneralOperand, // d
34        pub a: AddressOperand, // [a]
35        pub span: Span,
36    }
37}
38
39// Re-export types with section suffixes to avoid naming conflicts
40// e.g., Type0 for section_0::Type, Type1 for section_1::Type
41pub use section_0::Query as Query0;
42pub use section_0::SuqQueryB32;