Skip to content

Add infrastructure for NEON AARCH64 processors (WIP) #58

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion src/intrinsics/avx2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//! It is about twice as fast as the SSE2 version.
//!
//! Use `is_x86_feature_detected!("avx2")` provided
//! by the Rust stanard library to detect at runtime.
//! by the Rust standard library to detect at runtime.
//!
//! When using the `get_` functions, you will get a performance boost when width
//! is evenly divisble by 8, and when it is not small relative height and depth.
Expand Down
1 change: 1 addition & 0 deletions src/intrinsics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@ macro_rules! get_noise_scaled {
}

pub mod avx2;
pub mod neon;
pub mod scalar;
pub mod sse2;
pub mod sse41;
26 changes: 26 additions & 0 deletions src/intrinsics/neon.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//! SSE41 Accelerated noise functions.
//!
//! Use `is_aaRch64_feature_detected!("neon")` provided
//! by the Rust standard library to detect at runtime.
//!
use crate::noise::cell_32;
use crate::noise::cell_64;
use crate::noise::fbm_32;
use crate::noise::fbm_64;
use crate::noise::ridge_32;
use crate::noise::ridge_64;
use crate::noise::simplex_32;
use crate::noise::simplex_64;
use crate::noise::turbulence_32;
use crate::noise::turbulence_64;
use crate::noise_helpers_32;
use crate::noise_helpers_64;
use crate::shared::scale_noise;
use crate::{CellDistanceFunction, CellReturnType, DimensionalBeing, NoiseType};

use simdeez::{SimdTransmuteF32, SimdTransmuteF64};

#[cfg(all(target_arch = "aarch64", target_feature = "neon"))]
use std::arch::aarch64::*;

use std::f32;
2 changes: 1 addition & 1 deletion src/intrinsics/sse2.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! SSE2 Accelerated noise functions.
//!
//! Use `is_x86_feature_detected!("sse2")` provided
//! by the Rust stanard library to detect at runtime.
//! by the Rust standard library to detect at runtime.
//!
//! When using the `get_` functions, you will get a performance boost when width
//! is evenly divisble by 4, and when it is not small relative height and depth.
Expand Down
2 changes: 1 addition & 1 deletion src/intrinsics/sse41.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! SSE41 Accelerated noise functions.
//!
//! Use `is_x86_feature_detected!("sse4.1")` provided
//! by the Rust stanard library to detect at runtime.
//! by the Rust standard library to detect at runtime.
//!
//! When using the `get_` functions, you will get a performance boost when width
//! is evenly divisble by 4, and when it is not small relative height and depth.
Expand Down
Loading