Skip to content

Commit

Permalink
Merge pull request #673 from scottmcm/only-array-simd
Browse files Browse the repository at this point in the history
Use array simd in `U64x2`
  • Loading branch information
tgross35 authored Aug 22, 2024
2 parents 404fe91 + f3882e4 commit caf5998
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -482,20 +482,20 @@ macro_rules! intrinsics {
#[cfg(all(any(windows, target_os = "uefi"), target_pointer_width = "64"))]
pub mod win64_128bit_abi_hack {
#[repr(simd)]
pub struct U64x2(u64, u64);
pub struct U64x2([u64; 2]);

impl From<i128> for U64x2 {
fn from(i: i128) -> U64x2 {
use crate::int::DInt;
let j = i as u128;
U64x2(j.lo(), j.hi())
U64x2([j.lo(), j.hi()])
}
}

impl From<u128> for U64x2 {
fn from(i: u128) -> U64x2 {
use crate::int::DInt;
U64x2(i.lo(), i.hi())
U64x2([i.lo(), i.hi()])
}
}
}

0 comments on commit caf5998

Please sign in to comment.