Skip to content

Commit 0b7546f

Browse files
committed
upgrade formatting
1 parent e1e962a commit 0b7546f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+318
-334
lines changed

coresimd/ppsv/api/arithmetic_ops.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#![allow(unused)]
33

44
macro_rules! impl_arithmetic_ops {
5-
($id: ident) => {
5+
($id:ident) => {
66
impl ::ops::Add for $id {
77
type Output = Self;
88
#[inline]
@@ -87,7 +87,7 @@ macro_rules! impl_arithmetic_ops {
8787

8888
#[cfg(test)]
8989
macro_rules! test_arithmetic_ops {
90-
($id: ident, $elem_ty: ident) => {
90+
($id:ident, $elem_ty:ident) => {
9191
#[test]
9292
fn arithmetic() {
9393
use coresimd::simd::$id;

coresimd/ppsv/api/arithmetic_reductions.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#![allow(unused)]
33

44
macro_rules! impl_arithmetic_reductions {
5-
($id: ident, $elem_ty: ident) => {
5+
($id:ident, $elem_ty:ident) => {
66
impl $id {
77
/// Lane-wise addition of the vector elements.
88
///
@@ -65,7 +65,7 @@ macro_rules! impl_arithmetic_reductions {
6565

6666
#[cfg(test)]
6767
macro_rules! test_arithmetic_reductions {
68-
($id: ident, $elem_ty: ident) => {
68+
($id:ident, $elem_ty:ident) => {
6969
fn alternating(x: usize) -> ::coresimd::simd::$id {
7070
use coresimd::simd::$id;
7171
let mut v = $id::splat(1 as $elem_ty);

coresimd/ppsv/api/arithmetic_scalar_ops.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#![allow(unused)]
33

44
macro_rules! impl_arithmetic_scalar_ops {
5-
($id: ident, $elem_ty: ident) => {
5+
($id:ident, $elem_ty:ident) => {
66
impl ::ops::Add<$elem_ty> for $id {
77
type Output = Self;
88
#[inline]
@@ -117,7 +117,7 @@ macro_rules! impl_arithmetic_scalar_ops {
117117

118118
#[cfg(test)]
119119
macro_rules! test_arithmetic_scalar_ops {
120-
($id: ident, $elem_ty: ident) => {
120+
($id:ident, $elem_ty:ident) => {
121121
#[test]
122122
fn arithmetic_scalar() {
123123
use coresimd::simd::$id;

coresimd/ppsv/api/bitwise_ops.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#![allow(unused)]
33

44
macro_rules! impl_bitwise_ops {
5-
($id: ident, $true_val: expr) => {
5+
($id:ident, $true_val:expr) => {
66
impl ::ops::Not for $id {
77
type Output = Self;
88
#[inline]
@@ -57,7 +57,7 @@ macro_rules! impl_bitwise_ops {
5757

5858
#[cfg(test)]
5959
macro_rules! test_int_bitwise_ops {
60-
($id: ident, $elem_ty: ident) => {
60+
($id:ident, $elem_ty:ident) => {
6161
#[test]
6262
fn bitwise_ops() {
6363
use coresimd::simd::$id;
@@ -124,7 +124,7 @@ macro_rules! test_int_bitwise_ops {
124124

125125
#[cfg(test)]
126126
macro_rules! test_bool_bitwise_ops {
127-
($id: ident) => {
127+
($id:ident) => {
128128
#[test]
129129
fn bool_arithmetic() {
130130
use coresimd::simd::*;

coresimd/ppsv/api/bitwise_reductions.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#![allow(unused)]
33

44
macro_rules! impl_bitwise_reductions {
5-
($id: ident, $elem_ty: ident) => {
5+
($id:ident, $elem_ty:ident) => {
66
impl $id {
77
/// Lane-wise bitwise `and` of the vector elements.
88
#[cfg(not(target_arch = "aarch64"))]
@@ -68,7 +68,7 @@ macro_rules! impl_bitwise_reductions {
6868
}
6969

7070
macro_rules! impl_bool_bitwise_reductions {
71-
($id: ident, $elem_ty: ident, $internal_ty: ident) => {
71+
($id:ident, $elem_ty:ident, $internal_ty:ident) => {
7272
impl $id {
7373
/// Lane-wise bitwise `and` of the vector elements.
7474
#[cfg(not(target_arch = "aarch64"))]
@@ -144,7 +144,7 @@ macro_rules! impl_bool_bitwise_reductions {
144144

145145
#[cfg(test)]
146146
macro_rules! test_bitwise_reductions {
147-
($id: ident, $true: expr) => {
147+
($id:ident, $true:expr) => {
148148
#[test]
149149
fn and() {
150150
let false_ = !$true;

coresimd/ppsv/api/bitwise_scalar_ops.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#![allow(unused)]
33

44
macro_rules! impl_bitwise_scalar_ops {
5-
($id: ident, $elem_ty: ident) => {
5+
($id:ident, $elem_ty:ident) => {
66
impl ::ops::BitXor<$elem_ty> for $id {
77
type Output = Self;
88
#[inline]
@@ -71,7 +71,7 @@ macro_rules! impl_bitwise_scalar_ops {
7171

7272
#[cfg(test)]
7373
macro_rules! test_int_bitwise_scalar_ops {
74-
($id: ident, $elem_ty: ident) => {
74+
($id:ident, $elem_ty:ident) => {
7575
#[test]
7676
fn bitwise_scalar_ops() {
7777
use coresimd::simd::$id;
@@ -157,7 +157,7 @@ macro_rules! test_int_bitwise_scalar_ops {
157157

158158
#[cfg(test)]
159159
macro_rules! test_bool_bitwise_scalar_ops {
160-
($id: ident) => {
160+
($id:ident) => {
161161
#[test]
162162
fn bool_scalar_arithmetic() {
163163
use coresimd::simd::*;

coresimd/ppsv/api/bool_vectors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ macro_rules! impl_bool_minimal {
8989

9090
#[cfg(test)]
9191
macro_rules! test_bool_minimal {
92-
($id: ident, $elem_count: expr) => {
92+
($id:ident, $elem_count:expr) => {
9393
#[test]
9494
fn minimal() {
9595
use coresimd::simd::$id;

coresimd/ppsv/api/boolean_reductions.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#![allow(unused)]
33

44
macro_rules! impl_bool_reductions {
5-
($id: ident) => {
5+
($id:ident) => {
66
impl $id {
77
/// Are `all` vector lanes `true`?
88
#[cfg(not(target_arch = "aarch64"))]
@@ -47,7 +47,7 @@ macro_rules! impl_bool_reductions {
4747

4848
#[cfg(test)]
4949
macro_rules! test_bool_reductions {
50-
($id: ident) => {
50+
($id:ident) => {
5151
#[test]
5252
fn all() {
5353
use coresimd::simd::$id;

coresimd/ppsv/api/cmp.rs

+3-9
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#![allow(unused)]
33

44
macro_rules! impl_cmp {
5-
($id: ident, $bool_ty: ident) => {
5+
($id:ident, $bool_ty:ident) => {
66
impl $id {
77
/// Lane-wise equality comparison.
88
#[inline]
@@ -50,7 +50,7 @@ macro_rules! impl_cmp {
5050
}
5151

5252
macro_rules! impl_bool_cmp {
53-
($id: ident, $bool_ty: ident) => {
53+
($id:ident, $bool_ty:ident) => {
5454
impl $id {
5555
/// Lane-wise equality comparison.
5656
#[inline]
@@ -99,13 +99,7 @@ macro_rules! impl_bool_cmp {
9999

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

coresimd/ppsv/api/default.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#![allow(unused)]
33

44
macro_rules! impl_default {
5-
($id: ident, $elem_ty: ident) => {
5+
($id:ident, $elem_ty:ident) => {
66
impl ::default::Default for $id {
77
#[inline]
88
fn default() -> Self {
@@ -14,7 +14,7 @@ macro_rules! impl_default {
1414

1515
#[cfg(test)]
1616
macro_rules! test_default {
17-
($id: ident, $elem_ty: ident) => {
17+
($id:ident, $elem_ty:ident) => {
1818
#[test]
1919
fn default() {
2020
use coresimd::simd::$id;

coresimd/ppsv/api/eq.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#![allow(unused)]
33

44
macro_rules! impl_eq {
5-
($id: ident) => {
5+
($id:ident) => {
66
impl ::cmp::Eq for $id {}
77
};
88
}

coresimd/ppsv/api/fmt.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#![allow(unused)]
33

44
macro_rules! impl_hex_fmt {
5-
($id: ident, $elem_ty: ident) => {
5+
($id:ident, $elem_ty:ident) => {
66
impl ::fmt::LowerHex for $id {
77
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
88
use mem;
@@ -140,7 +140,7 @@ macro_rules! test_hex_fmt_impl {
140140

141141
#[cfg(test)]
142142
macro_rules! test_hex_fmt {
143-
($id: ident, $elem_ty: ident) => {
143+
($id:ident, $elem_ty:ident) => {
144144
test_hex_fmt_impl!(
145145
$id,
146146
$elem_ty,

coresimd/ppsv/api/from.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#![allow(unused)]
44

55
macro_rules! impl_from_impl {
6-
($from: ident, $to: ident) => {
6+
($from:ident, $to:ident) => {
77
impl ::convert::From<::simd::$from> for $to {
88
#[inline]
99
fn from(f: ::simd::$from) -> $to {
@@ -15,7 +15,7 @@ macro_rules! impl_from_impl {
1515
}
1616

1717
macro_rules! impl_from_ {
18-
($to: ident, $from: ident) => {
18+
($to:ident, $from:ident) => {
1919
vector_impl!([impl_from_impl, $to, $from]);
2020
};
2121
}

coresimd/ppsv/api/hash.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#![allow(unused)]
33

44
macro_rules! impl_hash {
5-
($id: ident, $elem_ty: ident) => {
5+
($id:ident, $elem_ty:ident) => {
66
impl ::hash::Hash for $id {
77
#[inline]
88
fn hash<H: ::hash::Hasher>(&self, state: &mut H) {
@@ -18,7 +18,7 @@ macro_rules! impl_hash {
1818

1919
#[cfg(test)]
2020
macro_rules! test_hash {
21-
($id: ident, $elem_ty: ident) => {
21+
($id:ident, $elem_ty:ident) => {
2222
#[test]
2323
fn hash() {
2424
use coresimd::simd::$id;

coresimd/ppsv/api/load_store.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#![allow(unused)]
33

44
macro_rules! impl_load_store {
5-
($id: ident, $elem_ty: ident, $elem_count: expr) => {
5+
($id:ident, $elem_ty:ident, $elem_count:expr) => {
66
impl $id {
77
/// Writes the values of the vector to the `slice`.
88
///
@@ -149,7 +149,7 @@ macro_rules! impl_load_store {
149149

150150
#[cfg(test)]
151151
macro_rules! test_load_store {
152-
($id: ident, $elem_ty: ident) => {
152+
($id:ident, $elem_ty:ident) => {
153153
#[test]
154154
fn store_unaligned() {
155155
use coresimd::simd::$id;

coresimd/ppsv/api/minimal.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ macro_rules! impl_minimal {
8484

8585
#[cfg(test)]
8686
macro_rules! test_minimal {
87-
($id: ident, $elem_ty: ident, $elem_count: expr) => {
87+
($id:ident, $elem_ty:ident, $elem_count:expr) => {
8888
#[test]
8989
fn minimal() {
9090
use coresimd::simd::$id;

coresimd/ppsv/api/minmax_reductions.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#![allow(unused)]
33

44
macro_rules! impl_minmax_reductions {
5-
($id: ident, $elem_ty: ident) => {
5+
($id:ident, $elem_ty:ident) => {
66
impl $id {
77
/// Largest vector value.
88
///
@@ -63,7 +63,7 @@ macro_rules! impl_minmax_reductions {
6363

6464
#[cfg(test)]
6565
macro_rules! test_minmax_reductions {
66-
($id: ident, $elem_ty: ident) => {
66+
($id:ident, $elem_ty:ident) => {
6767
#[test]
6868
fn max() {
6969
use coresimd::simd::$id;

coresimd/ppsv/api/neg.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#![allow(unused)]
33

44
macro_rules! impl_neg_op {
5-
($id: ident, $elem_ty: ident) => {
5+
($id:ident, $elem_ty:ident) => {
66
impl ::ops::Neg for $id {
77
type Output = Self;
88
#[inline]
@@ -15,7 +15,7 @@ macro_rules! impl_neg_op {
1515

1616
#[cfg(test)]
1717
macro_rules! test_neg_op {
18-
($id: ident, $elem_ty: ident) => {
18+
($id:ident, $elem_ty:ident) => {
1919
#[test]
2020
fn neg() {
2121
use coresimd::simd::$id;

coresimd/ppsv/api/partial_eq.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#![allow(unused)]
33

44
macro_rules! impl_partial_eq {
5-
($id: ident) => {
5+
($id:ident) => {
66
impl ::cmp::PartialEq<$id> for $id {
77
#[inline]
88
fn eq(&self, other: &Self) -> bool {
@@ -18,7 +18,7 @@ macro_rules! impl_partial_eq {
1818

1919
#[cfg(test)]
2020
macro_rules! test_partial_eq {
21-
($id: ident, $true: expr, $false: expr) => {
21+
($id:ident, $true:expr, $false:expr) => {
2222
#[test]
2323
fn partial_eq() {
2424
use coresimd::simd::*;

coresimd/ppsv/api/scalar_shifts.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ macro_rules! impl_shifts {
3939
}
4040

4141
macro_rules! impl_all_scalar_shifts {
42-
($id: ident, $elem_ty: ident) => {
42+
($id:ident, $elem_ty:ident) => {
4343
impl_shifts!(
4444
$id,
4545
$elem_ty,
@@ -123,7 +123,7 @@ macro_rules! test_shift_ops {
123123

124124
#[cfg(test)]
125125
macro_rules! test_all_scalar_shift_ops {
126-
($id: ident, $elem_ty: ident) => {
126+
($id:ident, $elem_ty:ident) => {
127127
test_shift_ops!(
128128
$id,
129129
$elem_ty,

coresimd/ppsv/api/shifts.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#![allow(unused)]
33

44
macro_rules! impl_vector_shifts {
5-
($id: ident, $elem_ty: ident) => {
5+
($id:ident, $elem_ty:ident) => {
66
impl ::ops::Shl<$id> for $id {
77
type Output = Self;
88
#[inline]
@@ -36,7 +36,7 @@ macro_rules! impl_vector_shifts {
3636

3737
#[cfg(test)]
3838
macro_rules! test_vector_shift_ops {
39-
($id: ident, $elem_ty: ident) => {
39+
($id:ident, $elem_ty:ident) => {
4040
#[test]
4141
fn shift_ops() {
4242
use coresimd::simd::$id;

0 commit comments

Comments
 (0)