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
57
58
59
60
61
62
63
use crate::simd::*;

#[cfg(target_arch = "x86")]
use core::arch::x86::*;

#[cfg(target_arch = "x86_64")]
use core::arch::x86_64::*;

from_transmute! { unsafe u8x16 => __m128i }
from_transmute! { unsafe u8x32 => __m256i }
from_transmute! { unsafe u8x64 => __m512i }
from_transmute! { unsafe i8x16 => __m128i }
from_transmute! { unsafe i8x32 => __m256i }
from_transmute! { unsafe i8x64 => __m512i }

from_transmute! { unsafe u16x8 => __m128i }
from_transmute! { unsafe u16x16 => __m256i }
from_transmute! { unsafe u16x32 => __m512i }
from_transmute! { unsafe i16x8 => __m128i }
from_transmute! { unsafe i16x16 => __m256i }
from_transmute! { unsafe i16x32 => __m512i }

from_transmute! { unsafe u32x4 => __m128i }
from_transmute! { unsafe u32x8 => __m256i }
from_transmute! { unsafe u32x16 => __m512i }
from_transmute! { unsafe i32x4 => __m128i }
from_transmute! { unsafe i32x8 => __m256i }
from_transmute! { unsafe i32x16 => __m512i }
from_transmute! { unsafe f32x4 => __m128 }
from_transmute! { unsafe f32x8 => __m256 }
from_transmute! { unsafe f32x16 => __m512 }

from_transmute! { unsafe u64x2 => __m128i }
from_transmute! { unsafe u64x4 => __m256i }
from_transmute! { unsafe u64x8 => __m512i }
from_transmute! { unsafe i64x2 => __m128i }
from_transmute! { unsafe i64x4 => __m256i }
from_transmute! { unsafe i64x8 => __m512i }
from_transmute! { unsafe f64x2 => __m128d }
from_transmute! { unsafe f64x4 => __m256d }
from_transmute! { unsafe f64x8 => __m512d }

#[cfg(target_pointer_width = "32")]
mod p32 {
    use super::*;
    from_transmute! { unsafe usizex4 => __m128i }
    from_transmute! { unsafe usizex8 => __m256i }
    from_transmute! { unsafe Simd<usize, 16> => __m512i }
    from_transmute! { unsafe isizex4 => __m128i }
    from_transmute! { unsafe isizex8 => __m256i }
    from_transmute! { unsafe Simd<isize, 16> => __m512i }
}

#[cfg(target_pointer_width = "64")]
mod p64 {
    use super::*;
    from_transmute! { unsafe usizex2 => __m128i }
    from_transmute! { unsafe usizex4 => __m256i }
    from_transmute! { unsafe usizex8 => __m512i }
    from_transmute! { unsafe isizex2 => __m128i }
    from_transmute! { unsafe isizex4 => __m256i }
    from_transmute! { unsafe isizex8 => __m512i }
}