pub mod traits;
-#[derive(Clone, Copy, Debug, Default, Hash)]
-#[repr(transparent)]
-pub struct F16(pub u16);
+#[cfg(feature = "f16")]
+pub use half::f16;
+
+#[cfg(not(feature = "f16"))]
+#[allow(non_camel_case_types)]
+#[derive(Clone, Copy, PartialEq, PartialOrd, Debug, Hash)]
+pub enum f16 {}
Mul, MulAssign, Neg, Not, Rem, RemAssign, Shl, ShlAssign, Shr, ShrAssign, Sub, SubAssign,
};
-use crate::F16;
+use crate::f16;
#[rustfmt::skip] // work around for https://github.com/rust-lang/rustfmt/issues/4823
macro_rules! make_float_type {
$U16;
#[int(prim = i16 $(, scalar = $ScalarI16)?)]
$I16;
- #[float(prim = F16 $(, scalar = $ScalarF16)?)]
+ #[float(prim = f16 $(, scalar = $ScalarF16)?)]
$F16;
},
{