Added
Link Here
|
0 |
- |
1 |
https://github.com/yoanlcq/vek/pull/95 |
|
|
2 |
https://github.com/yoanlcq/vek/commit/23a8a82e01135973f681182590ed0c7927d5f594 |
3 |
|
4 |
From 23a8a82e01135973f681182590ed0c7927d5f594 Mon Sep 17 00:00:00 2001 |
5 |
From: crabm4n <vlrncrabman+github@gmail.com> |
6 |
Date: Thu, 9 May 2024 15:21:06 +0000 |
7 |
Subject: [PATCH] Fix compatibility with latest nightly toolchain version |
8 |
|
9 |
Platform intrinsics were removed and are replaced with `core_intrinsics` |
10 |
(now accessible via `std::intrinsics::simd`). |
11 |
--- |
12 |
src/lib.rs | 8 +--- |
13 |
src/simd_llvm.rs | 96 ---------------------------------------------- |
14 |
src/simd_traits.rs | 57 --------------------------- |
15 |
src/vec.rs | 61 ++++++++++++++++------------- |
16 |
4 files changed, 36 insertions(+), 186 deletions(-) |
17 |
delete mode 100644 src/simd_llvm.rs |
18 |
delete mode 100644 src/simd_traits.rs |
19 |
|
20 |
diff --git a/src/lib.rs b/src/lib.rs |
21 |
index 7b96707..ff50bc4 100644 |
22 |
--- cargo-crates/vek-0.16.1/src/lib.rs |
23 |
+++ cargo-crates/vek-0.16.1/src/lib.rs |
24 |
@@ -37,7 +37,7 @@ |
25 |
#![cfg_attr(all(nightly, feature = "clippy"), plugin(clippy))] |
26 |
//#![cfg_attr(all(nightly, feature="repr_simd" ), feature(cfg_target_feature))] |
27 |
#![cfg_attr(all(nightly, feature = "repr_simd"), feature(repr_simd, simd_ffi))] |
28 |
-#![cfg_attr(all(nightly, feature = "platform_intrinsics"), feature(platform_intrinsics))] |
29 |
+#![cfg_attr(all(nightly, feature = "platform_intrinsics"), feature(portable_simd, core_intrinsics))] |
30 |
//#![cfg_attr(feature="repr_simd", allow(improper_ctypes)] |
31 |
//#![cfg_attr(feature="repr_simd", feature(link_llvm_intrinsics)] |
32 |
#![cfg_attr(all(nightly, test), feature(test))] |
33 |
@@ -72,10 +72,6 @@ pub extern crate num_traits; |
34 |
#[macro_use] |
35 |
pub extern crate approx; |
36 |
|
37 |
-#[cfg(feature = "platform_intrinsics")] |
38 |
-mod simd_llvm; |
39 |
-// ^ Please do not make this module public; we don't want people to use it, because it could change as the SIMD infrastructure evolves. |
40 |
- |
41 |
pub mod ops; |
42 |
pub use crate::ops::*; |
43 |
pub mod vec; |
44 |
@@ -92,5 +88,3 @@ pub mod bezier; |
45 |
pub use crate::bezier::*; |
46 |
pub mod geom; |
47 |
pub use crate::geom::*; |
48 |
-pub mod simd_traits; |
49 |
-pub use crate::simd_traits::*; |
50 |
diff --git a/src/simd_llvm.rs b/src/simd_llvm.rs |
51 |
deleted file mode 100644 |
52 |
index ac98202..0000000 |
53 |
--- cargo-crates/vek-0.16.1/src/simd_llvm.rs |
54 |
+++ /dev/null |
55 |
@@ -1,96 +0,0 @@ |
56 |
-// !!! NOTE !!! |
57 |
-// |
58 |
-// Downloaded from https://raw.githubusercontent.com/rust-lang/stdarch/master/crates/core_arch/src/simd_llvm.rs |
59 |
-// |
60 |
-// The relevant RFC is https://github.com/rust-lang/rfcs/blob/master/text/1199-simd-infrastructure.md |
61 |
-// |
62 |
- |
63 |
-//! LLVM's simd platform intrinsics |
64 |
-//! |
65 |
-//! TODO: should use `link_llvm_intrinsic` instead: issue #112 |
66 |
- |
67 |
-#[allow(dead_code)] |
68 |
-extern "platform-intrinsic" { |
69 |
- //pub fn simd_select_bitmask |
70 |
- pub fn simd_eq<T, U>(x: T, y: T) -> U; |
71 |
- pub fn simd_ne<T, U>(x: T, y: T) -> U; |
72 |
- pub fn simd_lt<T, U>(x: T, y: T) -> U; |
73 |
- pub fn simd_le<T, U>(x: T, y: T) -> U; |
74 |
- pub fn simd_gt<T, U>(x: T, y: T) -> U; |
75 |
- pub fn simd_ge<T, U>(x: T, y: T) -> U; |
76 |
- |
77 |
- // #[rustc_args_required_const(2)] |
78 |
- // pub fn simd_shuffle2<T, U>(x: T, y: T, idx: [u32; 2]) -> U; |
79 |
- // #[rustc_args_required_const(2)] |
80 |
- // pub fn simd_shuffle4<T, U>(x: T, y: T, idx: [u32; 4]) -> U; |
81 |
- // #[rustc_args_required_const(2)] |
82 |
- // pub fn simd_shuffle8<T, U>(x: T, y: T, idx: [u32; 8]) -> U; |
83 |
- // #[rustc_args_required_const(2)] |
84 |
- // pub fn simd_shuffle16<T, U>(x: T, y: T, idx: [u32; 16]) -> U; |
85 |
- // #[rustc_args_required_const(2)] |
86 |
- // pub fn simd_shuffle32<T, U>(x: T, y: T, idx: [u32; 32]) -> U; |
87 |
- // #[rustc_args_required_const(2)] |
88 |
- // pub fn simd_shuffle64<T, U>(x: T, y: T, idx: [u32; 64]) -> U; |
89 |
- // #[rustc_args_required_const(2)] |
90 |
- // pub fn simd_shuffle128<T, U>(x: T, y: T, idx: [u32; 128]) -> U; |
91 |
- |
92 |
- // #[rustc_const_unstable(feature = "const_simd_insert", issue = "none")] |
93 |
- // pub fn simd_insert<T, U>(x: T, idx: u32, val: U) -> T; |
94 |
- // #[rustc_const_unstable(feature = "const_simd_extract", issue = "none")] |
95 |
- // pub fn simd_extract<T, U>(x: T, idx: u32) -> U; |
96 |
- //pub fn simd_select |
97 |
- pub fn simd_bitmask<T, U>(x: T) -> U; |
98 |
- |
99 |
- pub fn simd_cast<T, U>(x: T) -> U; |
100 |
- |
101 |
- pub fn simd_add<T>(x: T, y: T) -> T; |
102 |
- pub fn simd_sub<T>(x: T, y: T) -> T; |
103 |
- pub fn simd_mul<T>(x: T, y: T) -> T; |
104 |
- pub fn simd_div<T>(x: T, y: T) -> T; |
105 |
- pub fn simd_shl<T>(x: T, y: T) -> T; |
106 |
- pub fn simd_shr<T>(x: T, y: T) -> T; |
107 |
- pub fn simd_and<T>(x: T, y: T) -> T; |
108 |
- pub fn simd_or<T>(x: T, y: T) -> T; |
109 |
- pub fn simd_xor<T>(x: T, y: T) -> T; |
110 |
- |
111 |
- pub fn simd_saturating_add<T>(x: T, y: T) -> T; |
112 |
- pub fn simd_saturating_sub<T>(x: T, y: T) -> T; |
113 |
- |
114 |
- pub fn simd_gather<T, U, V>(values: T, pointers: U, mask: V) -> T; |
115 |
- pub fn simd_scatter<T, U, V>(values: T, pointers: U, mask: V); |
116 |
- |
117 |
- pub fn simd_reduce_add_unordered<T, U>(x: T) -> U; |
118 |
- pub fn simd_reduce_mul_unordered<T, U>(x: T) -> U; |
119 |
- pub fn simd_reduce_add_ordered<T, U>(x: T, acc: U) -> U; |
120 |
- pub fn simd_reduce_mul_ordered<T, U>(x: T, acc: U) -> U; |
121 |
- pub fn simd_reduce_min<T, U>(x: T) -> U; |
122 |
- pub fn simd_reduce_max<T, U>(x: T) -> U; |
123 |
- pub fn simd_reduce_min_nanless<T, U>(x: T) -> U; |
124 |
- pub fn simd_reduce_max_nanless<T, U>(x: T) -> U; |
125 |
- pub fn simd_reduce_and<T, U>(x: T) -> U; |
126 |
- pub fn simd_reduce_or<T, U>(x: T) -> U; |
127 |
- pub fn simd_reduce_xor<T, U>(x: T) -> U; |
128 |
- pub fn simd_reduce_all<T>(x: T) -> bool; |
129 |
- pub fn simd_reduce_any<T>(x: T) -> bool; |
130 |
- |
131 |
- pub fn simd_select<M, T>(m: M, a: T, b: T) -> T; |
132 |
- pub fn simd_select_bitmask<M, T>(m: M, a: T, b: T) -> T; |
133 |
- |
134 |
- pub fn simd_fmin<T>(a: T, b: T) -> T; |
135 |
- pub fn simd_fmax<T>(a: T, b: T) -> T; |
136 |
- |
137 |
- pub fn simd_fsqrt<T>(a: T) -> T; |
138 |
- pub fn simd_fsin<T>(a: T) -> T; |
139 |
- pub fn simd_fcos<T>(a: T) -> T; |
140 |
- pub fn simd_fabs<T>(a: T) -> T; |
141 |
- pub fn simd_floor<T>(a: T) -> T; |
142 |
- pub fn simd_ceil<T>(a: T) -> T; |
143 |
- pub fn simd_fexp<T>(a: T) -> T; |
144 |
- pub fn simd_fexp2<T>(a: T) -> T; |
145 |
- pub fn simd_flog10<T>(a: T) -> T; |
146 |
- pub fn simd_flog2<T>(a: T) -> T; |
147 |
- pub fn simd_flog<T>(a: T) -> T; |
148 |
- //pub fn simd_fpowi |
149 |
- //pub fn simd_fpow |
150 |
- pub fn simd_fma<T>(a: T, b: T, c: T) -> T; |
151 |
-} |
152 |
diff --git a/src/simd_traits.rs b/src/simd_traits.rs |
153 |
deleted file mode 100644 |
154 |
index 17ab13c..0000000 |
155 |
--- cargo-crates/vek-0.16.1/src/simd_traits.rs |
156 |
+++ /dev/null |
157 |
@@ -1,57 +0,0 @@ |
158 |
-//! SIMD traits; they are useful when the features "repr_simd" and "platform_intrinsics" are enabled. |
159 |
- |
160 |
-use std::num::Wrapping; |
161 |
-use num_traits; |
162 |
- |
163 |
-/// This trait should be implemented by scalar types, vectors of which are supported by SIMD intrinsics. |
164 |
-/// For instance, i16 and f32 can implement this trait, as well as `#[repr(transparent)]` wrappers of these, but not hand-built numeric types. |
165 |
-pub trait SimdElement { |
166 |
- /// The corresponding mask type for this element type: this is usually the unsigned integer type with the same size. |
167 |
- type SimdMaskType: SimdMask; |
168 |
-} |
169 |
- |
170 |
-/// Implemented by unsigned integer types that can represent the result of SIMD comparison elements: semantically, these are booleans, but in their representation, zero is false and any other value is true. |
171 |
-/// Typically, SIMD comparison of two vectors will yield a vector of mask elements, on which you can call `reduce_and()` or `reduce_or()`. |
172 |
-pub trait SimdMask: num_traits::sign::Unsigned + num_traits::bounds::Bounded + num_traits::cast::FromPrimitive { |
173 |
- /// Used for fallback code. |
174 |
- #[inline] |
175 |
- fn from_bool(b: bool) -> Self { |
176 |
- Self::from_u8(b as _).unwrap() |
177 |
- } |
178 |
-} |
179 |
- |
180 |
-macro_rules! impl_simd_mask { |
181 |
- ($T:ty) => { |
182 |
- impl SimdMask for $T {} |
183 |
- } |
184 |
-} |
185 |
- |
186 |
-macro_rules! impl_simd_element { |
187 |
- ($T:ty, $M:ty) => { |
188 |
- impl SimdElement for $T { |
189 |
- type SimdMaskType = $M; |
190 |
- } |
191 |
- } |
192 |
-} |
193 |
- |
194 |
-impl_simd_mask!{u8} |
195 |
-impl_simd_mask!{u16} |
196 |
-impl_simd_mask!{u32} |
197 |
-impl_simd_mask!{u64} |
198 |
- |
199 |
-impl<T: SimdMask> SimdMask for Wrapping<T> where Wrapping<T>: num_traits::sign::Unsigned {} |
200 |
- |
201 |
-impl_simd_element!{i8, u8} |
202 |
-impl_simd_element!{i16, u16} |
203 |
-impl_simd_element!{i32, u32} |
204 |
-impl_simd_element!{i64, u64} |
205 |
-impl_simd_element!{u8, u8} |
206 |
-impl_simd_element!{u16, u16} |
207 |
-impl_simd_element!{u32, u32} |
208 |
-impl_simd_element!{u64, u64} |
209 |
-impl_simd_element!{f32, u32} |
210 |
-impl_simd_element!{f64, u64} |
211 |
- |
212 |
-impl<T: SimdElement> SimdElement for Wrapping<T> { |
213 |
- type SimdMaskType = T::SimdMaskType; // Don't propagate the Wrapping<>, masks are only intended for reduction to booleans; it doesn't make sense to perform arithmetic on them. |
214 |
-} |
215 |
\ No newline at end of file |
216 |
diff --git a/src/vec.rs b/src/vec.rs |
217 |
index 7c5cc7f..d488a90 100644 |
218 |
--- cargo-crates/vek-0.16.1/src/vec.rs |
219 |
+++ cargo-crates/vek-0.16.1/src/vec.rs |
220 |
@@ -14,13 +14,11 @@ use std::cmp; |
221 |
use std::ops::*; |
222 |
use std::slice::{self, /*SliceIndex*/}; // NOTE: Will want to use SliceIndex once it's stabilized |
223 |
use std::num::Wrapping; |
224 |
+#[cfg(feature = "platform_intrinsics")] |
225 |
+use std::simd::SimdElement; |
226 |
use num_traits::{Zero, One, NumCast, AsPrimitive, Signed, real::Real}; |
227 |
use approx::{AbsDiffEq, RelativeEq, UlpsEq}; |
228 |
use crate::ops::*; |
229 |
-use crate::simd_traits::{SimdElement, SimdMask}; |
230 |
- |
231 |
-#[cfg(feature = "platform_intrinsics")] |
232 |
-use crate::simd_llvm; |
233 |
|
234 |
#[cfg(feature = "bytemuck")] |
235 |
use crate::bytemuck; |
236 |
@@ -87,13 +85,24 @@ macro_rules! vec_impl_cmp { |
237 |
}} |
238 |
} |
239 |
$(#[$attrs])* |
240 |
+ #[cfg(feature = "platform_intrinsics")] |
241 |
#[inline] |
242 |
- pub fn $cmp_simd(self, rhs: Self) -> $Vec<T::SimdMaskType> where T: $Bounds + SimdElement { |
243 |
+ pub fn $cmp_simd(self, rhs: Self) -> $Vec<T::Mask> |
244 |
+ where |
245 |
+ T: $Bounds + SimdElement, |
246 |
+ <T as SimdElement>::Mask: num_traits::cast::FromPrimitive { |
247 |
choose!{$c_or_simd { |
248 |
- c => $Vec::new($(T::SimdMaskType::from_bool(self.$get $op rhs.$get)),+), |
249 |
- simd_llvm => unsafe { simd_llvm::$simd_cmp(self, rhs) }, |
250 |
+ c => $Vec::new($(<T::Mask as num_traits::cast::FromPrimitive>::from_u8((self.$get $op rhs.$get) as _).unwrap()),+), |
251 |
+ simd_llvm => unsafe { std::intrinsics::simd::$simd_cmp(self, rhs) }, |
252 |
}} |
253 |
} |
254 |
+ |
255 |
+ $(#[$attrs])* |
256 |
+ #[cfg(not(feature = "platform_intrinsics"))] |
257 |
+ #[inline] |
258 |
+ pub fn $cmp_simd(self, rhs: Self) -> $Vec<bool> where T: $Bounds { |
259 |
+ self.$cmp(&rhs) |
260 |
+ } |
261 |
} |
262 |
} |
263 |
|
264 |
@@ -167,7 +176,7 @@ macro_rules! vec_impl_binop { |
265 |
let rhs = rhs.into(); |
266 |
choose!{$c_or_simd { |
267 |
c => $Vec::new($(self.$get.$op(rhs.$get)),+), |
268 |
- simd_llvm => unsafe { simd_llvm::$simd_op(self, rhs) }, |
269 |
+ simd_llvm => unsafe { std::intrinsics::simd::$simd_op(self, rhs) }, |
270 |
}} |
271 |
} |
272 |
} |
273 |
@@ -273,7 +282,7 @@ macro_rules! vec_impl_reduce_bool_ops_for_primitive { |
274 |
pub fn reduce_and(self) -> bool { |
275 |
choose!{$c_or_simd { |
276 |
c => reduce_binop!(&&, $(!self.$get.is_zero()),+), |
277 |
- simd_llvm => unsafe { simd_llvm::simd_reduce_all(self) }, |
278 |
+ simd_llvm => unsafe { std::intrinsics::simd::simd_reduce_all(self) }, |
279 |
}} |
280 |
} |
281 |
/// Returns the result of logical OR (`||`) on all elements of this vector. |
282 |
@@ -288,7 +297,7 @@ macro_rules! vec_impl_reduce_bool_ops_for_primitive { |
283 |
pub fn reduce_or(self) -> bool { |
284 |
choose!{$c_or_simd { |
285 |
c => reduce_binop!(||, $(!self.$get.is_zero()),+), |
286 |
- simd_llvm => unsafe { simd_llvm::simd_reduce_any(self) }, |
287 |
+ simd_llvm => unsafe { std::intrinsics::simd::simd_reduce_any(self) }, |
288 |
}} |
289 |
} |
290 |
} |
291 |
@@ -668,7 +677,7 @@ macro_rules! vec_impl_vec { |
292 |
pub fn as_<D>(self) -> $Vec<D> where T: AsPrimitive<D>, D: 'static + Copy { |
293 |
choose!{$c_or_simd { |
294 |
c => $Vec::new($(self.$get.as_()),+), |
295 |
- simd_llvm => unsafe { simd_llvm::simd_cast(self) }, |
296 |
+ simd_llvm => unsafe { std::intrinsics::simd::simd_cast(self) }, |
297 |
}} |
298 |
} |
299 |
/// Returns a memberwise-converted copy of this vector, using `NumCast`. |
300 |
@@ -712,7 +721,7 @@ macro_rules! vec_impl_vec { |
301 |
let add = add.into(); |
302 |
choose!{$c_or_simd { |
303 |
c => $Vec::new($(self.$get.mul_add(mul.$get, add.$get)),+), |
304 |
- simd_llvm => unsafe { simd_llvm::simd_fma(self, mul, add) }, |
305 |
+ simd_llvm => unsafe { std::intrinsics::simd::simd_fma(self, mul, add) }, |
306 |
}} |
307 |
} |
308 |
|
309 |
@@ -803,7 +812,7 @@ macro_rules! vec_impl_vec { |
310 |
pub fn reduce_min(self) -> T where T: Ord { |
311 |
choose!{$c_or_simd { |
312 |
c => reduce_fn!(cmp::min, $(self.$get),+), |
313 |
- simd_llvm => unsafe { simd_llvm::simd_reduce_min(self) }, |
314 |
+ simd_llvm => unsafe { std::intrinsics::simd::simd_reduce_min(self) }, |
315 |
}} |
316 |
} |
317 |
/// Returns the element which has the highest value in this vector, using total |
318 |
@@ -817,7 +826,7 @@ macro_rules! vec_impl_vec { |
319 |
pub fn reduce_max(self) -> T where T: Ord { |
320 |
choose!{$c_or_simd { |
321 |
c => reduce_fn!(cmp::max, $(self.$get),+), |
322 |
- simd_llvm => unsafe { simd_llvm::simd_reduce_max(self) }, |
323 |
+ simd_llvm => unsafe { std::intrinsics::simd::simd_reduce_max(self) }, |
324 |
}} |
325 |
} |
326 |
|
327 |
@@ -832,7 +841,7 @@ macro_rules! vec_impl_vec { |
328 |
pub fn reduce_partial_min(self) -> T where T: PartialOrd { |
329 |
choose!{$c_or_simd { |
330 |
c => reduce_fn!(partial_min, $(self.$get),+), |
331 |
- simd_llvm => unsafe { simd_llvm::simd_reduce_min(self) }, |
332 |
+ simd_llvm => unsafe { std::intrinsics::simd::simd_reduce_min(self) }, |
333 |
}} |
334 |
} |
335 |
/// Returns the element which has the highest value in this vector, using partial |
336 |
@@ -846,7 +855,7 @@ macro_rules! vec_impl_vec { |
337 |
pub fn reduce_partial_max(self) -> T where T: PartialOrd { |
338 |
choose!{$c_or_simd { |
339 |
c => reduce_fn!(partial_max, $(self.$get),+), |
340 |
- simd_llvm => unsafe { simd_llvm::simd_reduce_max(self) }, |
341 |
+ simd_llvm => unsafe { std::intrinsics::simd::simd_reduce_max(self) }, |
342 |
}} |
343 |
} |
344 |
|
345 |
@@ -862,7 +871,7 @@ macro_rules! vec_impl_vec { |
346 |
pub fn reduce_bitand(self) -> T where T: BitAnd<T, Output=T> { |
347 |
choose!{$c_or_simd { |
348 |
c => reduce_binop!(&, $(self.$get),+), |
349 |
- simd_llvm => unsafe { simd_llvm::simd_reduce_and(self) }, |
350 |
+ simd_llvm => unsafe { std::intrinsics::simd::simd_reduce_and(self) }, |
351 |
}} |
352 |
} |
353 |
|
354 |
@@ -877,7 +886,7 @@ macro_rules! vec_impl_vec { |
355 |
pub fn reduce_bitor(self) -> T where T: BitOr<T, Output=T> { |
356 |
choose!{$c_or_simd { |
357 |
c => reduce_binop!(|, $(self.$get),+), |
358 |
- simd_llvm => unsafe { simd_llvm::simd_reduce_or(self) }, |
359 |
+ simd_llvm => unsafe { std::intrinsics::simd::simd_reduce_or(self) }, |
360 |
}} |
361 |
} |
362 |
|
363 |
@@ -892,7 +901,7 @@ macro_rules! vec_impl_vec { |
364 |
pub fn reduce_bitxor(self) -> T where T: BitXor<T, Output=T> { |
365 |
choose!{$c_or_simd { |
366 |
c => reduce_binop!(^, $(self.$get),+), |
367 |
- simd_llvm => unsafe { simd_llvm::simd_reduce_xor(self) }, |
368 |
+ simd_llvm => unsafe { std::intrinsics::simd::simd_reduce_xor(self) }, |
369 |
}} |
370 |
} |
371 |
|
372 |
@@ -912,7 +921,7 @@ macro_rules! vec_impl_vec { |
373 |
pub fn product(self) -> T where T: Mul<Output=T> { |
374 |
choose!{$c_or_simd { |
375 |
c => reduce_binop!(*, $(self.$get),+), |
376 |
- simd_llvm => unsafe { simd_llvm::simd_reduce_mul_unordered(self) }, |
377 |
+ simd_llvm => unsafe { std::intrinsics::simd::simd_reduce_mul_unordered(self) }, |
378 |
}} |
379 |
} |
380 |
/// Returns the sum of each of this vector's elements. |
381 |
@@ -925,7 +934,7 @@ macro_rules! vec_impl_vec { |
382 |
pub fn sum(self) -> T where T: Add<T, Output=T> { |
383 |
choose!{$c_or_simd { |
384 |
c => reduce_binop!(+, $(self.$get),+), |
385 |
- simd_llvm => unsafe { simd_llvm::simd_reduce_add_unordered(self) }, |
386 |
+ simd_llvm => unsafe { std::intrinsics::simd::simd_reduce_add_unordered(self) }, |
387 |
}} |
388 |
} |
389 |
/// Returns the average of this vector's elements. |
390 |
@@ -980,7 +989,7 @@ macro_rules! vec_impl_vec { |
391 |
pub fn sqrt(self) -> Self where T: Real { |
392 |
choose!{$c_or_simd { |
393 |
c => Self::new($(self.$get.sqrt()),+), |
394 |
- simd_llvm => unsafe { simd_llvm::simd_fsqrt(self) }, |
395 |
+ simd_llvm => unsafe { std::intrinsics::simd::simd_fsqrt(self) }, |
396 |
}} |
397 |
} |
398 |
|
399 |
@@ -1022,7 +1031,7 @@ macro_rules! vec_impl_vec { |
400 |
pub fn ceil(self) -> Self where T: Real { |
401 |
choose!{$c_or_simd { |
402 |
c => Self::new($(self.$get.ceil()),+), |
403 |
- simd_llvm => unsafe { simd_llvm::simd_ceil(self) }, |
404 |
+ simd_llvm => unsafe { std::intrinsics::simd::simd_ceil(self) }, |
405 |
}} |
406 |
} |
407 |
/// Returns a new vector which elements are rounded down to the nearest lower integer. |
408 |
@@ -1036,7 +1045,7 @@ macro_rules! vec_impl_vec { |
409 |
pub fn floor(self) -> Self where T: Real { |
410 |
choose!{$c_or_simd { |
411 |
c => Self::new($(self.$get.floor()),+), |
412 |
- simd_llvm => unsafe { simd_llvm::simd_floor(self) }, |
413 |
+ simd_llvm => unsafe { std::intrinsics::simd::simd_floor(self) }, |
414 |
}} |
415 |
} |
416 |
/// Returns a new vector which elements are rounded to the nearest integer. |
417 |
@@ -1645,7 +1654,7 @@ macro_rules! vec_impl_vec { |
418 |
pub fn reduce_and(self) -> bool { |
419 |
choose!{$c_or_simd { |
420 |
c => reduce_binop!(&&, $(self.$get),+), |
421 |
- simd_llvm => unsafe { simd_llvm::simd_reduce_all(self.into_native_simd_integer_vector()) }, |
422 |
+ simd_llvm => unsafe { std::intrinsics::simd::simd_reduce_all(self.into_native_simd_integer_vector()) }, |
423 |
}} |
424 |
} |
425 |
/// Returns the result of logical OR (`||`) on all elements of this vector. |
426 |
@@ -1659,7 +1668,7 @@ macro_rules! vec_impl_vec { |
427 |
pub fn reduce_or(self) -> bool { |
428 |
choose!{$c_or_simd { |
429 |
c => reduce_binop!(||, $(self.$get),+), |
430 |
- simd_llvm => unsafe { simd_llvm::simd_reduce_any(self.into_native_simd_integer_vector()) }, |
431 |
+ simd_llvm => unsafe { std::intrinsics::simd::simd_reduce_any(self.into_native_simd_integer_vector()) }, |
432 |
}} |
433 |
} |
434 |
/// Reduces this vector using total inequality. |