Skip to content

Commit 3fe16a9

Browse files
jasondaviesgnzlbg
authored andcommitted
rustfmt
1 parent 6da981f commit 3fe16a9

File tree

32 files changed

+307
-107
lines changed

32 files changed

+307
-107
lines changed

coresimd/aarch64/crypto.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,10 @@ pub unsafe fn vsha256su1q_u32(
184184

185185
#[cfg(test)]
186186
mod tests {
187-
use stdsimd_test::simd_test;
188-
use simd::*;
189187
use coresimd::aarch64::*;
188+
use simd::*;
190189
use std::mem;
190+
use stdsimd_test::simd_test;
191191

192192
#[simd_test = "crypto"]
193193
unsafe fn test_vaeseq_u8() {

coresimd/aarch64/neon.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
33
// FIXME: replace neon with asimd
44

5+
use coresimd::arm::*;
6+
use coresimd::simd::*;
7+
use coresimd::simd_llvm::simd_add;
58
#[cfg(test)]
69
use stdsimd_test::assert_instr;
7-
use coresimd::simd_llvm::simd_add;
8-
use coresimd::simd::*;
9-
use coresimd::arm::*;
1010

1111
types! {
1212
/// ARM-specific 64-bit wide vector of one packed `f64`.
@@ -382,10 +382,10 @@ pub unsafe fn vminvq_f64(a: float64x2_t) -> f64 {
382382

383383
#[cfg(test)]
384384
mod tests {
385-
use stdsimd_test::simd_test;
386-
use simd::*;
387385
use coresimd::aarch64::*;
386+
use simd::*;
388387
use std::mem;
388+
use stdsimd_test::simd_test;
389389

390390
#[simd_test = "neon"]
391391
unsafe fn test_vadd_f64() {

coresimd/arm/neon.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
//! ARMv7 NEON intrinsics
22
3+
use coresimd::simd::*;
4+
use coresimd::simd_llvm::*;
35
#[cfg(test)]
46
use stdsimd_test::assert_instr;
5-
use coresimd::simd_llvm::*;
6-
use coresimd::simd::*;
77

88
types! {
99
/// ARM-specific 64-bit wide vector of eight packed `i8`.
@@ -682,10 +682,10 @@ pub unsafe fn vrsqrte_f32(a: float32x2_t) -> float32x2_t {
682682

683683
#[cfg(test)]
684684
mod tests {
685-
use stdsimd_test::simd_test;
686-
use simd::*;
687685
use coresimd::arm::*;
686+
use simd::*;
688687
use std::mem;
688+
use stdsimd_test::simd_test;
689689

690690
#[simd_test = "neon"]
691691
unsafe fn test_vadd_s8() {

coresimd/mips/msa.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
//!
66
//! [msa_ref]: http://cdn2.imgtec.com/documentation/MD00866-2B-MSA32-AFP-01.12.pdf
77
8+
use coresimd::simd::*;
89
#[cfg(test)]
910
use stdsimd_test::assert_instr;
10-
use coresimd::simd::*;
1111

1212
#[allow(improper_ctypes)]
1313
extern "C" {
@@ -28,9 +28,9 @@ pub unsafe fn __msa_add_a_b(a: i8x16, b: i8x16) -> i8x16 {
2828

2929
#[cfg(test)]
3030
mod tests {
31+
use coresimd::mips64::msa;
3132
use simd::*;
3233
use stdsimd_test::simd_test;
33-
use coresimd::mips64::msa;
3434

3535
#[simd_test = "msa"]
3636
unsafe fn __msa_add_a_b() {

coresimd/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ pub mod arch {
7777
#[cfg(any(target_arch = "aarch64", dox))]
7878
#[doc(cfg(target_arch = "aarch64"))]
7979
pub mod aarch64 {
80-
pub use coresimd::arm::*;
8180
pub use coresimd::aarch64::*;
81+
pub use coresimd::arm::*;
8282
}
8383

8484
/// Platform-specific intrinsics for the `wasm32` platform.
@@ -115,10 +115,10 @@ mod x86;
115115
#[cfg(any(target_arch = "x86_64", dox))]
116116
mod x86_64;
117117

118-
#[cfg(any(target_arch = "arm", target_arch = "aarch64", dox))]
119-
mod arm;
120118
#[cfg(any(target_arch = "aarch64", dox))]
121119
mod aarch64;
120+
#[cfg(any(target_arch = "arm", target_arch = "aarch64", dox))]
121+
mod arm;
122122
#[cfg(target_arch = "wasm32")]
123123
mod wasm32;
124124

coresimd/ppsv/api/cmp.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,16 @@ macro_rules! impl_bool_cmp {
9999

100100
#[cfg(test)]
101101
macro_rules! test_cmp {
102-
($id:ident, $elem_ty:ident, $bool_ty:ident,
103-
$true:expr, $false:expr) => {
102+
(
103+
$id: ident,
104+
$elem_ty: ident,
105+
$bool_ty: ident,
106+
$true: expr,
107+
$false: expr
108+
) => {
104109
#[test]
105110
fn cmp() {
106-
use ::coresimd::simd::*;
111+
use coresimd::simd::*;
107112

108113
let a = $id::splat($false);
109114
let b = $id::splat($true);
@@ -139,5 +144,5 @@ macro_rules! test_cmp {
139144
let r = a.lt(b);
140145
assert!(r == e);
141146
}
142-
}
147+
};
143148
}

coresimd/ppsv/api/load_store.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ macro_rules! impl_load_store {
130130
pub unsafe fn load_unaligned_unchecked(
131131
slice: &[$elem_ty]
132132
) -> Self {
133-
use slice::SliceExt;
134133
use mem::size_of;
134+
use slice::SliceExt;
135135
let target_ptr =
136136
slice.get_unchecked(0) as *const $elem_ty as *const u8;
137137
let mut x = Self::splat(0 as $elem_ty);

coresimd/ppsv/api/minmax_reductions.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ macro_rules! impl_minmax_reductions {
2222
pub fn max(self) -> $elem_ty {
2323
// FIXME: broken on AArch64
2424
// https://bugs.llvm.org/show_bug.cgi?id=36796
25-
use num::Float;
2625
use cmp::Ord;
26+
use num::Float;
2727
let mut x = self.extract(0);
2828
for i in 1..$id::lanes() {
2929
x = x.max(self.extract(i));
@@ -49,8 +49,8 @@ macro_rules! impl_minmax_reductions {
4949
pub fn min(self) -> $elem_ty {
5050
// FIXME: broken on AArch64
5151
// https://bugs.llvm.org/show_bug.cgi?id=36796
52-
use num::Float;
5352
use cmp::Ord;
53+
use num::Float;
5454
let mut x = self.extract(0);
5555
for i in 1..$id::lanes() {
5656
x = x.min(self.extract(i));

coresimd/ppsv/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,19 @@
3333
#[macro_use]
3434
mod api;
3535

36-
mod v16;
37-
mod v32;
38-
mod v64;
3936
mod v128;
37+
mod v16;
4038
mod v256;
39+
mod v32;
4140
mod v512;
41+
mod v64;
4242

43-
pub use self::v16::*;
44-
pub use self::v32::*;
45-
pub use self::v64::*;
4643
pub use self::v128::*;
44+
pub use self::v16::*;
4745
pub use self::v256::*;
46+
pub use self::v32::*;
4847
pub use self::v512::*;
48+
pub use self::v64::*;
4949

5050
/// Safe lossless bitwise conversion from `T` to `Self`.
5151
pub trait FromBits<T>: ::marker::Sized {

coresimd/ppsv/v128.rs

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,17 @@ use coresimd::arch::aarch64::{// FIXME: float16x8_t,
121121
uint8x16_t};
122122

123123
macro_rules! from_bits_arm {
124-
($id:ident, $elem_ty:ident, $test_mod_arm:ident, $test_mod_a64:ident) => {
125-
#[cfg(any(all(target_arch = "arm",
126-
target_feature = "neon",
127-
target_feature = "v7"), target_arch = "aarch64"))]
124+
(
125+
$id: ident,
126+
$elem_ty: ident,
127+
$test_mod_arm: ident,
128+
$test_mod_a64: ident
129+
) => {
130+
#[cfg(any(all(target_arch = "arm", target_feature = "neon",
131+
target_feature = "v7"),
132+
target_arch = "aarch64"))]
128133
impl_from_bits_!(
129-
$id:
130-
int8x16_t,
134+
$id: int8x16_t,
131135
uint8x16_t,
132136
int16x8_t,
133137
uint16x8_t,
@@ -141,10 +145,8 @@ macro_rules! from_bits_arm {
141145
poly16x8_t
142146
);
143147
#[cfg(target_arch = "aarch64")]
144-
impl_from_bits_!(
145-
$id: float64x2_t
146-
);
147-
}
148+
impl_from_bits_!($id: float64x2_t);
149+
};
148150
}
149151

150152
impl_from_bits!(

0 commit comments

Comments
 (0)