Skip to content

Commit

Permalink
pray to ferris
Browse files Browse the repository at this point in the history
  • Loading branch information
fu5ha committed Aug 21, 2020
1 parent 41319b7 commit df48692
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/f32x4_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,14 @@ impl f32x4 {
// acos
let z3 = self.cmp_lt(f32x4::ZERO).blend(f32x4::PI - z1, z1);
let z4 = f32x4::FRAC_PI_2 - z.flip_signs(self);
let acos = big.blend(z3, z4);
pick! {
if #[cfg(target_feature="sse")] {
let acos = big.blend(z3, z4);
} else {
let acos: u32x4 = cast(big).blend(cast(z3), cast(z4));
let acos = cast(acos);
}
}

// asin
let z3 = f32x4::FRAC_PI_2 - z1;
Expand Down Expand Up @@ -556,7 +563,14 @@ impl f32x4 {
// acos
let z3 = self.cmp_lt(f32x4::ZERO).blend(f32x4::PI - z1, z1);
let z4 = f32x4::FRAC_PI_2 - z.flip_signs(self);
let acos = big.blend(z3, z4);
pick! {
if #[cfg(target_feature="sse")] {
let acos = big.blend(z3, z4);
} else {
let acos: u32x4 = cast(big).blend(cast(z3), cast(z4));
let acos = cast(acos);
}
}

acos
}
Expand Down

0 comments on commit df48692

Please sign in to comment.