]> git.proxmox.com Git - rustc.git/blob - src/stdsimd/coresimd/ppsv/v64.rs
New upstream version 1.26.0+dfsg1
[rustc.git] / src / stdsimd / coresimd / ppsv / v64.rs
1 //! 64-bit wide portable packed vector types.
2
3 simd_api_imports!();
4
5 use coresimd::simd::{b8x2, b8x4};
6
7 simd_i_ty! {
8 i8x8: 8, i8, b8x8, i8x8_tests |
9 i8, i8, i8, i8, i8, i8, i8, i8 |
10 x0, x1, x2, x3, x4, x5, x6, x7 |
11 /// A 64-bit vector with 8 `i8` lanes.
12 }
13
14 simd_u_ty! {
15 u8x8: 8, u8, b8x8, u8x8_tests |
16 u8, u8, u8, u8, u8, u8, u8, u8 |
17 x0, x1, x2, x3, x4, x5, x6, x7 |
18 /// A 64-bit vector with 8 `u8` lanes.
19 }
20
21 simd_b_ty! {
22 b8x8: 8, i8, b8x8_tests |
23 i8, i8, i8, i8, i8, i8, i8, i8 |
24 x0, x1, x2, x3, x4, x5, x6, x7 |
25 /// A 64-bit vector with 8 `bool` lanes.
26 }
27
28 simd_i_ty! {
29 i16x4: 4, i16, b8x4, i16x4_tests |
30 i16, i16, i16, i16 |
31 x0, x1, x2, x3 |
32 /// A 64-bit vector with 4 `i16` lanes.
33 }
34
35 simd_u_ty! {
36 u16x4: 4, u16, b8x4, u16x4_tests |
37 u16, u16, u16, u16 |
38 x0, x1, x2, x3 |
39 /// A 64-bit vector with 4 `u16` lanes.
40 }
41
42 simd_i_ty! {
43 i32x2: 2, i32, b8x2, i32x2_tests |
44 i32, i32 |
45 x0, x1 |
46 /// A 64-bit vector with 2 `i32` lanes.
47 }
48
49 simd_u_ty! {
50 u32x2: 2, u32, b8x2, u32x2_tests |
51 u32, u32 |
52 x0, x1 |
53 /// A 64-bit vector with 2 `u32` lanes.
54 }
55
56 simd_f_ty! {
57 f32x2: 2, f32, b8x2, f32x2_tests |
58 f32, f32 |
59 x0, x1 |
60 /// A 64-bit vector with 2 `f32` lanes.
61 }
62
63 impl_from_bits!(
64 u32x2: u32,
65 u32x2_from_bits | i32x2,
66 f32x2,
67 u16x4,
68 i16x4,
69 u8x8,
70 i8x8,
71 b8x8
72 );
73 impl_from_bits!(
74 i32x2: i32,
75 i32x2_from_bits | u32x2,
76 f32x2,
77 u16x4,
78 i16x4,
79 u8x8,
80 i8x8,
81 b8x8
82 );
83 impl_from_bits!(
84 f32x2: f32,
85 f32x2_from_bits | i32x2,
86 u32x2,
87 u16x4,
88 i16x4,
89 u8x8,
90 i8x8,
91 b8x8
92 );
93 impl_from_bits!(
94 u16x4: u16,
95 u16x4_from_bits | u32x2,
96 i32x2,
97 i16x4,
98 u8x8,
99 i8x8,
100 b8x8
101 );
102 impl_from_bits!(
103 i16x4: i16,
104 i16x4_from_bits | u32x2,
105 i32x2,
106 u16x4,
107 u8x8,
108 i8x8,
109 b8x8
110 );
111 impl_from_bits!(
112 u8x8: u8,
113 u8x8_from_bits | u32x2,
114 i32x2,
115 u16x4,
116 i16x4,
117 i8x8,
118 b8x8
119 );
120 impl_from_bits!(
121 i8x8: i8,
122 i8x8_from_bits | u32x2,
123 i32x2,
124 u16x4,
125 i16x4,
126 u8x8,
127 b8x8
128 );
129
130 #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
131 use coresimd::x86::__m64;
132
133 #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
134 impl_from_bits_!(f32x2: __m64);
135 #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
136 impl_from_bits_!(u32x2: __m64);
137 #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
138 impl_from_bits_!(i32x2: __m64);
139 #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
140 impl_from_bits_!(u16x4: __m64);
141 #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
142 impl_from_bits_!(i16x4: __m64);
143 #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
144 impl_from_bits_!(u8x8: __m64);
145 #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
146 impl_from_bits_!(i8x8: __m64);
147
148 impl_from!(
149 f32x2: f32,
150 f32x2_from | f64x2,
151 u64x2,
152 i64x2,
153 u32x2,
154 i32x2,
155 u16x2,
156 i16x2,
157 u8x2,
158 i8x2
159 );
160
161 impl_from!(
162 u32x2: u32,
163 u32x2_from | f64x2,
164 u64x2,
165 i64x2,
166 f32x2,
167 i32x2,
168 u16x2,
169 i16x2,
170 u8x2,
171 i8x2
172 );
173
174 impl_from!(
175 i32x2: i32,
176 i32x2_from | f64x2,
177 u64x2,
178 i64x2,
179 f32x2,
180 u32x2,
181 u16x2,
182 i16x2,
183 u8x2,
184 i8x2
185 );
186
187 impl_from!(
188 u16x4: u16,
189 u16x4_from | f64x4,
190 u64x4,
191 i64x4,
192 f32x4,
193 i32x4,
194 u32x4,
195 i16x4,
196 u8x4,
197 i8x4
198 );
199
200 impl_from!(
201 i16x4: i16,
202 i16x4_from | f64x4,
203 u64x4,
204 i64x4,
205 f32x4,
206 i32x4,
207 u32x4,
208 u16x4,
209 u8x4,
210 i8x4
211 );
212 impl_from!(
213 i8x8: i8,
214 i8x8_from | f64x8,
215 u64x8,
216 i64x8,
217 f32x8,
218 u32x8,
219 i32x8,
220 i16x8,
221 u16x8,
222 u8x8
223 );
224 impl_from!(
225 u8x8: u8,
226 u8x8_from | f64x8,
227 u64x8,
228 i64x8,
229 f32x8,
230 u32x8,
231 i32x8,
232 i16x8,
233 u16x8,
234 i8x8
235 );