Introduce core::simd trait imports in tests
This commit is contained in:
parent
a14404a028
commit
f8aa494c69
@ -3569,6 +3569,7 @@ pub unsafe fn align_to_mut<U>(&mut self) -> (&mut [T], &mut [U], &mut [T]) {
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(portable_simd)]
|
||||
/// use core::simd::SimdFloat;
|
||||
///
|
||||
/// let short = &[1, 2, 3];
|
||||
/// let (prefix, middle, suffix) = short.as_simd::<4>();
|
||||
|
@ -1,4 +1,5 @@
|
||||
use core::simd::f32x4;
|
||||
use core::simd::SimdFloat;
|
||||
|
||||
#[test]
|
||||
fn testing() {
|
||||
|
@ -5,7 +5,7 @@
|
||||
#![crate_type = "lib"]
|
||||
#![feature(portable_simd)]
|
||||
|
||||
use std::simd::Simd;
|
||||
use std::simd::{Simd, SimdUint};
|
||||
const N: usize = 8;
|
||||
|
||||
#[no_mangle]
|
||||
|
@ -2,6 +2,7 @@
|
||||
#![no_std]
|
||||
#![feature(portable_simd)]
|
||||
use core::simd::f32x4;
|
||||
use core::simd::SimdFloat;
|
||||
|
||||
// For SIMD float ops, the LLIR version which is used to implement the portable
|
||||
// forms of them may become calls to math.h AKA libm. So, we can't guarantee
|
||||
|
@ -1,35 +1,35 @@
|
||||
error[E0599]: no method named `ceil` found for struct `Simd` in the current scope
|
||||
--> $DIR/libm_no_std_cant_float.rs:14:17
|
||||
--> $DIR/libm_no_std_cant_float.rs:15:17
|
||||
|
|
||||
LL | let _xc = x.ceil();
|
||||
| ^^^^ method not found in `Simd<f32, 4_usize>`
|
||||
|
||||
error[E0599]: no method named `floor` found for struct `Simd` in the current scope
|
||||
--> $DIR/libm_no_std_cant_float.rs:15:17
|
||||
--> $DIR/libm_no_std_cant_float.rs:16:17
|
||||
|
|
||||
LL | let _xf = x.floor();
|
||||
| ^^^^^ method not found in `Simd<f32, 4_usize>`
|
||||
|
||||
error[E0599]: no method named `round` found for struct `Simd` in the current scope
|
||||
--> $DIR/libm_no_std_cant_float.rs:16:17
|
||||
--> $DIR/libm_no_std_cant_float.rs:17:17
|
||||
|
|
||||
LL | let _xr = x.round();
|
||||
| ^^^^^ method not found in `Simd<f32, 4_usize>`
|
||||
|
||||
error[E0599]: no method named `trunc` found for struct `Simd` in the current scope
|
||||
--> $DIR/libm_no_std_cant_float.rs:17:17
|
||||
--> $DIR/libm_no_std_cant_float.rs:18:17
|
||||
|
|
||||
LL | let _xt = x.trunc();
|
||||
| ^^^^^ method not found in `Simd<f32, 4_usize>`
|
||||
|
||||
error[E0599]: no method named `mul_add` found for struct `Simd` in the current scope
|
||||
--> $DIR/libm_no_std_cant_float.rs:18:19
|
||||
--> $DIR/libm_no_std_cant_float.rs:19:19
|
||||
|
|
||||
LL | let _xfma = x.mul_add(x, x);
|
||||
| ^^^^^^^ method not found in `Simd<f32, 4_usize>`
|
||||
|
||||
error[E0599]: no method named `sqrt` found for struct `Simd` in the current scope
|
||||
--> $DIR/libm_no_std_cant_float.rs:19:20
|
||||
--> $DIR/libm_no_std_cant_float.rs:20:20
|
||||
|
|
||||
LL | let _xsqrt = x.sqrt();
|
||||
| ^^^^ method not found in `Simd<f32, 4_usize>`
|
||||
|
@ -3,7 +3,7 @@
|
||||
// This is the converse of the other libm test.
|
||||
#![feature(portable_simd)]
|
||||
use std::simd::f32x4;
|
||||
use std::simd::StdFloat;
|
||||
use std::simd::{SimdFloat, StdFloat};
|
||||
|
||||
// For SIMD float ops, the LLIR version which is used to implement the portable
|
||||
// forms of them may become calls to math.h AKA libm. So, we can't guarantee
|
||||
|
Loading…
Reference in New Issue
Block a user