Skip to content

Commit 68870a9

Browse files
committed
formatting
1 parent 31a72df commit 68870a9

File tree

8 files changed

+40
-23
lines changed

8 files changed

+40
-23
lines changed

src/api/from/from_vector.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ macro_rules! impl_from_vector {
1818
}
1919

2020
// FIXME: `Into::into` is not inline, but due to
21-
// the blanket impl in `std`, which is not
22-
// marked `default`, we cannot override it here with
23-
// specialization.
24-
/*
25-
impl Into<$id> for $source {
26-
#[inline]
27-
fn into(self) -> $id {
28-
unsafe { simd_cast(self) }
29-
}
30-
}
31-
*/
21+
// the blanket impl in `std`, which is not
22+
// marked `default`, we cannot override it here with
23+
// specialization.
24+
/*
25+
impl Into<$id> for $source {
26+
#[inline]
27+
fn into(self) -> $id {
28+
unsafe { simd_cast(self) }
29+
}
30+
}
31+
*/
3232

3333
#[cfg(test)]
3434
interpolate_idents! {

src/codegen/math/float/abs.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,12 @@ macro_rules! impl_fabs {
5151
impl Abs for $id {
5252
#[inline]
5353
fn abs(self) -> Self {
54-
#[cfg(not(target_arch = "s390x"))] {
54+
#[cfg(not(target_arch = "s390x"))]
55+
{
5556
unsafe { $fn(self) }
5657
}
57-
#[cfg(target_arch = "s390x")] {
58+
#[cfg(target_arch = "s390x")]
59+
{
5860
// FIXME: https://github.com/gnzlbg/packed_simd/issues/14
5961
let mut v = $id::splat(0.);
6062
for i in 0..$id::lanes() {

src/codegen/math/float/cos.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,12 @@ macro_rules! impl_fcos {
5151
impl Cos for $id {
5252
#[inline]
5353
fn cos(self) -> Self {
54-
#[cfg(not(target_arch = "s390x"))] {
54+
#[cfg(not(target_arch = "s390x"))]
55+
{
5556
unsafe { $fn(self) }
5657
}
57-
#[cfg(target_arch = "s390x")] {
58+
#[cfg(target_arch = "s390x")]
59+
{
5860
// FIXME: https://github.com/gnzlbg/packed_simd/issues/14
5961
let mut v = $id::splat(0.);
6062
for i in 0..$id::lanes() {

src/codegen/math/float/fma.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,12 @@ macro_rules! impl_fma {
3434
impl Fma for $id {
3535
#[inline]
3636
fn fma(self, y: Self, z: Self) -> Self {
37-
#[cfg(not(target_arch = "s390x"))] {
37+
#[cfg(not(target_arch = "s390x"))]
38+
{
3839
unsafe { $fn(self, y, z) }
3940
}
40-
#[cfg(target_arch = "s390x")] {
41+
#[cfg(target_arch = "s390x")]
42+
{
4143
// FIXME: https://github.com/gnzlbg/packed_simd/issues/14
4244
self * y + z
4345
}

src/codegen/math/float/sin.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,12 @@ macro_rules! impl_fsin {
5151
impl Sin for $id {
5252
#[inline]
5353
fn sin(self) -> Self {
54-
#[cfg(not(target_arch = "s390x"))] {
54+
#[cfg(not(target_arch = "s390x"))]
55+
{
5556
unsafe { $fn(self) }
5657
}
57-
#[cfg(target_arch = "s390x")] {
58+
#[cfg(target_arch = "s390x")]
59+
{
5860
// FIXME: https://github.com/gnzlbg/packed_simd/issues/14
5961
let mut v = $id::splat(0.);
6062
for i in 0..$id::lanes() {

src/codegen/math/float/sqrt.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,12 @@ macro_rules! impl_sqrt {
5151
impl Sqrt for $id {
5252
#[inline]
5353
fn sqrt(self) -> Self {
54-
#[cfg(not(target_arch = "s390x"))] {
54+
#[cfg(not(target_arch = "s390x"))]
55+
{
5556
unsafe { $fn(self) }
5657
}
57-
#[cfg(target_arch = "s390x")] {
58+
#[cfg(target_arch = "s390x")]
59+
{
5860
// FIXME: https://github.com/gnzlbg/packed_simd/issues/14
5961
let mut v = $id::splat(0.);
6062
for i in 0..$id::lanes() {

src/codegen/shuffle.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
//! Implementations of the `ShuffleResult` trait for the different numbers of
22
//! lanes and vector element types.
33
4-
use sealed::Shuffle;
54
use masks::*;
5+
use sealed::Shuffle;
66

77
impl Shuffle<[u32; 2]> for i8 {
88
type Output = crate::codegen::i8x2;

src/codegen/swap_bytes.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,14 @@ macro_rules! impl_swap_bytes {
110110
impl_swap_bytes!(v16: u8x2, i8x2,);
111111
impl_swap_bytes!(v32: u8x4, i8x4, u16x2, i16x2,);
112112
// FIXME: 64-bit single element vector
113-
impl_swap_bytes!(v64: u8x8, i8x8, u16x4, i16x4, u32x2, i32x2, /*u64x1, i64x1,*/);
113+
impl_swap_bytes!(
114+
v64: u8x8,
115+
i8x8,
116+
u16x4,
117+
i16x4,
118+
u32x2,
119+
i32x2, /*u64x1, i64x1,*/
120+
);
114121
impl_swap_bytes!(
115122
v128: u8x16,
116123
i8x16,

0 commit comments

Comments
 (0)