Skip to content

Commit

Permalink
add aarch64 target_arch to imports
Browse files Browse the repository at this point in the history
  • Loading branch information
jvdd committed Feb 21, 2024
1 parent 51d821d commit 468c83e
Showing 1 changed file with 31 additions and 6 deletions.
37 changes: 31 additions & 6 deletions src/simd/simd_i16.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
#[cfg(any(target_arch = "x86", target_arch = "x86_64", feature = "nightly_simd"))]
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
feature = "nightly_simd"
))]
use super::config::SIMDInstructionSet;
#[cfg(any(target_arch = "x86", target_arch = "x86_64", feature = "nightly_simd"))]
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
feature = "nightly_simd"
))]
use super::generic::{impl_SIMDArgMinMax, impl_SIMDInit_Int, SIMDArgMinMax, SIMDInit, SIMDOps};
#[cfg(any(target_arch = "x86", target_arch = "x86_64", feature = "nightly_simd"))]
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
feature = "nightly_simd"
))]
use crate::SCALAR;
#[cfg(target_arch = "aarch64")]
use std::arch::aarch64::*;
Expand All @@ -14,10 +29,20 @@ use std::arch::x86::*;
use std::arch::x86_64::*;

/// The dtype-strategy for performing operations on i16 data: (default) Int
#[cfg(any(target_arch = "x86", target_arch = "x86_64", feature = "nightly_simd"))]
#[cfg(any(
target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
feature = "nightly_simd"
))]
use super::super::dtype_strategy::Int;

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

// --------------------------------------- AVX2 ----------------------------------------
Expand Down Expand Up @@ -394,7 +419,7 @@ mod avx512 {

#[cfg(any(
all(target_arch = "arm", feature = "nightly_simd"),
target_arch = "aarch64"
target_arch = "aarch64" // stable for AArch64
))]
mod neon {
use super::super::config::NEON;
Expand Down

0 comments on commit 468c83e

Please sign in to comment.