1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! Frozen unary-operation discriminants for primitive operation metadata.
/// Unary operation kind in the frozen data contract.
///
/// Example: `UnOp::ReverseBits` identifies a bit-reversal primitive without
/// binding the catalog to a backend intrinsic spelling.
#[derive(Debug, Clone, PartialEq, Eq, Hash, serde::Deserialize, serde::Serialize)]
pub enum UnOp {
/// Arithmetic negation.
Negate,
/// Bitwise NOT.
BitNot,
/// Logical NOT.
LogicalNot,
/// Count set bits.
Popcount,
/// Count leading zeros.
Clz,
/// Count trailing zeros.
Ctz,
/// Reverse all bits.
ReverseBits,
/// Cosine (f32).
Cos,
/// Sine (f32).
Sin,
/// Absolute value (f32).
Abs,
/// Square root (f32).
Sqrt,
/// Floor (f32).
Floor,
/// Ceil (f32).
Ceil,
/// Round (f32).
Round,
/// Trunc (f32).
Trunc,
/// Sign (f32).
Sign,
/// Is NaN (f32).
IsNan,
/// Is Inf (f32).
IsInf,
/// Is Finite (f32).
IsFinite,
}