Skip to main content

ptx_parser/type/instruction/
tanh.rs

1//! Original PTX specification:
2//!
3//! tanh.approx.type d, a;
4//! .type = {.f16, .f32, .f16x2, .bf16, .bf16x2};
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 Type {
18        Bf16x2, // .bf16x2
19        F16x2,  // .f16x2
20        Bf16,   // .bf16
21        F16,    // .f16
22        F32,    // .f32
23    }
24
25    #[derive(Debug, Clone, PartialEq, Spanned, Serialize)]
26    pub struct TanhApproxType {
27        pub approx: (),        // .approx
28        pub type_: Type,       // .type
29        pub d: GeneralOperand, // d
30        pub a: GeneralOperand, // a
31        pub span: Span,
32    }
33}
34
35// Re-export types with section suffixes to avoid naming conflicts
36// e.g., Type0 for section_0::Type, Type1 for section_1::Type
37pub use section_0::TanhApproxType;
38pub use section_0::Type as Type0;