acme_tensor/linalg/
uplo.rs1#[cfg(feature = "serde")]
6use serde::{Deserialize, Serialize};
7use strum::{Display, EnumCount, EnumIs, EnumIter, EnumString, VariantNames};
8
9#[cfg_attr(
10 feature = "serde",
11 derive(Deserialize, Serialize,),
12 serde(rename_all = "lowercase", untagged)
13)]
14#[derive(
15 Clone,
16 Copy,
17 Debug,
18 Default,
19 Display,
20 EnumCount,
21 EnumIs,
22 EnumIter,
23 EnumString,
24 Eq,
25 Hash,
26 Ord,
27 PartialEq,
28 PartialOrd,
29 VariantNames,
30)]
31#[repr(usize)]
32#[strum(serialize_all = "lowercase")]
33pub enum UPLO {
34 Lower,
35 #[default]
36 Upper,
37}
38
39impl UPLO {
40 pub fn lower() -> Self {
41 Self::Lower
42 }
43
44 pub fn upper() -> Self {
45 Self::Upper
46 }
47}
48
49unsafe impl Send for UPLO {}
50
51unsafe impl Sync for UPLO {}