furiosa_visa_std/vector_engine/
layer.rs1use smart_default::SmartDefault;
4
5#[derive(Debug, Clone, Copy, SmartDefault)]
7pub struct FxpToFp(u32);
8
9impl FxpToFp {
10 pub fn new(int_width: u32) -> Self {
12 Self(int_width)
13 }
14
15 pub fn int_width(&self) -> u32 {
17 self.0
18 }
19}
20
21#[derive(Debug, Clone, Copy, SmartDefault)]
23pub struct FpToFxp(u32);
24
25impl FpToFxp {
26 pub fn new(int_width: u32) -> Self {
28 Self(int_width)
29 }
30
31 pub fn int_width(&self) -> u32 {
33 self.0
34 }
35}