Skip to content

Commit bfd4f2a

Browse files
committed
Inline the rng functions
1 parent a1c178a commit bfd4f2a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

examples/aobench/src/random.rs

+3
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ pub mod vector {
9191
RngT(z0, z1, z2, z3)
9292
}
9393

94+
#[inline]
9495
pub fn gen_u32(&mut self) -> u32xN {
9596
let mut b = ((self.0 << 6) ^ self.0) >> 13;
9697
self.0 = ((self.0 & u32xN::splat(4_294_967_294)) << 18) ^ b;
@@ -103,6 +104,7 @@ pub mod vector {
103104
self.0 ^ self.1 ^ self.2 ^ self.3
104105
}
105106

107+
#[inline]
106108
pub fn gen(&mut self) -> f32xN {
107109
let mut v = self.gen_u32();
108110
v &= u32xN::splat((1_u32 << 23) - 1);
@@ -119,6 +121,7 @@ pub mod vector {
119121
}
120122

121123
impl RngH {
124+
#[inline]
122125
pub fn gen(&mut self) -> f32xN {
123126
unsafe { (*self.rng.get()).gen() }
124127
}

0 commit comments

Comments
 (0)