GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — arrayfire-rust/src/core/num.rs at master · arrayfire/arrayfire-rust Expand file tree/ Copy pathnum.rsMore file actions 56 lines (50 loc) · 996 Bytes / Copy pathnum.rsFile metadata and controls56 lines (50 loc) · 996 Bytes 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 48 49 50 51 52 53 54 55 56 pub trait Zero { fn zero() -> Self; } pub trait One { fn one() -> Self; } macro_rules! zero_impl { ( $t:ident, $z:expr ) => { impl Zero for $t { fn zero() -> Self { $z } } }; } zero_impl!(u8, 0); zero_impl!(u16, 0); zero_impl!(u32, 0); zero_impl!(u64, 0); zero_impl!(usize, 0); zero_impl!(i8, 0); zero_impl!(i16, 0); zero_impl!(i32, 0); zero_impl!(i64, 0); zero_impl!(isize, 0); zero_impl!(f32, 0.0); zero_impl!(f64, 0.0); zero_impl!(half::f16, half::f16::from_f32(0.0)); macro_rules! one_impl { ( $t:ident, $o:expr ) => { impl One for $t { fn one() -> Self { $o } } }; } one_impl!(u8, 1); one_impl!(u16, 1); one_impl!(u32, 1); one_impl!(u64, 1); one_impl!(usize, 1); one_impl!(i8, 1); one_impl!(i16, 1); one_impl!(i32, 1); one_impl!(i64, 1); one_impl!(isize, 1); one_impl!(f32, 1.0); one_impl!(f64, 1.0); one_impl!(half::f16, half::f16::from_f32(1.0)); |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |