Skip to content

Commit

Permalink
♻️
Browse files Browse the repository at this point in the history
  • Loading branch information
jvdd committed Feb 24, 2024
1 parent d575a56 commit 773f08d
Show file tree
Hide file tree
Showing 14 changed files with 49 additions and 49 deletions.
2 changes: 1 addition & 1 deletion src/simd/simd_f16_ignore_nan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -753,8 +753,8 @@ mod neon_ignore_nan {
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
#[cfg(test)]
mod tests {
Expand Down
2 changes: 1 addition & 1 deletion src/simd/simd_f16_return_nan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -704,8 +704,8 @@ mod neon {
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
#[cfg(test)]
mod tests {
Expand Down
12 changes: 6 additions & 6 deletions src/simd/simd_f32_ignore_nan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,31 @@
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
use super::config::SIMDInstructionSet;
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
use super::generic::{
impl_SIMDArgMinMax, impl_SIMDInit_FloatIgnoreNaN, SIMDArgMinMax, SIMDInit, SIMDOps,
};
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
use crate::SCALAR;
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
use num_traits::Zero;
#[cfg(target_arch = "aarch64")]
Expand All @@ -54,17 +54,17 @@ use std::arch::x86_64::*;
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
use super::super::dtype_strategy::FloatIgnoreNaN;

// https://stackoverflow.com/a/3793950
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
const MAX_INDEX: usize = 1 << f32::MANTISSA_DIGITS;

Expand Down
4 changes: 2 additions & 2 deletions src/simd/simd_f32_return_nan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ const BIT_SHIFT: i32 = 31;
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
const MASK_VALUE: i32 = 0x7FFFFFFF; // i32::MAX - masks everything but the sign bit

Expand All @@ -105,8 +105,8 @@ fn _i32ord_to_f32(ord_i32: i32) -> f32 {
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
const MAX_INDEX: usize = i32::MAX as usize;

Expand Down
6 changes: 3 additions & 3 deletions src/simd/simd_f64_ignore_nan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ use super::generic::{impl_SIMDArgMinMax, impl_SIMDInit_FloatIgnoreNaN};
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
use super::generic::{SIMDArgMinMax, SIMDInit, SIMDOps};
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
use crate::SCALAR;
#[cfg(any(target_arch = "x86", target_arch = "x86_64", target_arch = "aarch64"))]
Expand All @@ -43,8 +43,8 @@ use std::arch::x86_64::*;
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
use super::super::dtype_strategy::FloatIgnoreNaN;

Expand Down
6 changes: 3 additions & 3 deletions src/simd/simd_f64_return_nan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ use super::generic::impl_SIMDInit_FloatReturnNaN;
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
use super::generic::{SIMDArgMinMax, SIMDInit, SIMDOps};
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
use crate::SCALAR;
#[cfg(target_arch = "aarch64")]
Expand All @@ -58,8 +58,8 @@ use std::arch::x86_64::*;
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
use super::super::dtype_strategy::FloatReturnNaN;

Expand Down
10 changes: 5 additions & 5 deletions src/simd/simd_i16.rs
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
use super::config::SIMDInstructionSet;
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
use super::generic::{impl_SIMDArgMinMax, impl_SIMDInit_Int, SIMDArgMinMax, SIMDInit, SIMDOps};
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
use crate::SCALAR;
#[cfg(target_arch = "aarch64")]
Expand All @@ -32,16 +32,16 @@ use std::arch::x86_64::*;
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
use super::super::dtype_strategy::Int;

#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
const MAX_INDEX: usize = i16::MAX as usize;

Expand Down
10 changes: 5 additions & 5 deletions src/simd/simd_i32.rs
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
use super::config::SIMDInstructionSet;
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
use super::generic::{impl_SIMDArgMinMax, impl_SIMDInit_Int, SIMDArgMinMax, SIMDInit, SIMDOps};
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
use crate::SCALAR;
#[cfg(target_arch = "aarch64")]
Expand All @@ -32,16 +32,16 @@ use std::arch::x86_64::*;
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
use super::super::dtype_strategy::Int;

#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
const MAX_INDEX: usize = i32::MAX as usize;

Expand Down
6 changes: 3 additions & 3 deletions src/simd/simd_i64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ use super::generic::{impl_SIMDArgMinMax, impl_SIMDInit_Int};
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
use super::generic::{SIMDArgMinMax, SIMDInit, SIMDOps};
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
use crate::SCALAR;
#[cfg(target_arch = "aarch64")]
Expand All @@ -27,8 +27,8 @@ use std::arch::x86_64::*;
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
use super::super::dtype_strategy::Int;

Expand Down
10 changes: 5 additions & 5 deletions src/simd/simd_i8.rs
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
use super::config::SIMDInstructionSet;
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
use super::generic::{impl_SIMDArgMinMax, impl_SIMDInit_Int, SIMDArgMinMax, SIMDInit, SIMDOps};
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
use crate::SCALAR;
#[cfg(target_arch = "aarch64")]
Expand All @@ -32,16 +32,16 @@ use std::arch::x86_64::*;
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
use super::super::dtype_strategy::Int;

#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
const MAX_INDEX: usize = i8::MAX as usize;

Expand Down
8 changes: 4 additions & 4 deletions src/simd/simd_u16.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
use super::config::SIMDInstructionSet;
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
use super::generic::{impl_SIMDArgMinMax, impl_SIMDInit_Int, SIMDArgMinMax, SIMDInit, SIMDOps};
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
use crate::SCALAR;
#[cfg(target_arch = "aarch64")]
Expand All @@ -44,8 +44,8 @@ use std::arch::x86_64::*;
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
use super::super::dtype_strategy::Int;

Expand Down
8 changes: 4 additions & 4 deletions src/simd/simd_u32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
use super::config::SIMDInstructionSet;
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
use super::generic::{impl_SIMDArgMinMax, impl_SIMDInit_Int, SIMDArgMinMax, SIMDInit, SIMDOps};
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
use crate::SCALAR;
#[cfg(target_arch = "aarch64")]
Expand All @@ -44,8 +44,8 @@ use std::arch::x86_64::*;
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64",
))]
use super::super::dtype_strategy::Int;

Expand Down
Loading

0 comments on commit 773f08d

Please sign in to comment.