ptx_parser/type/instruction/
mapa.rs

1//! Original PTX specification:
2//!
3//! mapa{.space}.type          d, a, b;
4//! // Maps shared memory address in register a into CTA b.
5//! // mapa.shared::cluster.type  d, a, b;
6//! // Maps shared memory variable into CTA b.
7//! // mapa.shared::cluster.type  d, sh, b;
8//! // Maps shared memory variable into CTA b.
9//! // mapa.shared::cluster.type  d, sh + imm, b;
10//! // Maps generic address in register a into CTA b.
11//! // mapa.type                  d, a, b;
12//! .space = { .shared::cluster };
13//! .type  = { .u32, .u64 };
14
15#![allow(unused)]
16use crate::r#type::common::*;
17
18pub mod section_0 {
19    use crate::r#type::common::*;
20
21    #[derive(Debug, Clone, PartialEq)]
22    pub enum Space {
23        SharedCluster, // .shared::cluster
24    }
25
26    #[derive(Debug, Clone, PartialEq)]
27    pub enum Type {
28        U32, // .u32
29        U64, // .u64
30    }
31
32    #[derive(Debug, Clone, PartialEq)]
33    pub struct MapaSpaceType {
34        pub space: Option<Space>, // {.space}
35        pub type_: Type,          // .type
36        pub d: GeneralOperand,    // d
37        pub a: GeneralOperand,    // a
38        pub b: GeneralOperand,    // b
39    }
40}
41
42// Re-export types with section suffixes to avoid naming conflicts
43// e.g., Type0 for section_0::Type, Type1 for section_1::Type
44pub use section_0::MapaSpaceType;
45pub use section_0::Space as Space0;
46pub use section_0::Type as Type0;