Skip to content

arm Neon vector backend #19

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/backend/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ pub mod serial;
#[cfg(any(
all(
feature = "simd_backend",
any(target_feature = "avx2", target_feature = "avx512ifma")
any(target_feature = "avx2", target_feature = "avx512ifma", target_feature = "neon")
),
all(feature = "nightly", rustdoc)
))]
#[cfg_attr(
feature = "nightly",
doc(cfg(any(all(
feature = "simd_backend",
any(target_feature = "avx2", target_feature = "avx512ifma")
any(target_feature = "avx2", target_feature = "avx512ifma", target_feature = "neon")
))))
)]
pub mod vector;
2 changes: 1 addition & 1 deletion src/backend/serial/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ pub mod curve_models;

#[cfg(not(all(
feature = "simd_backend",
any(target_feature = "avx2", target_feature = "avx512ifma")
any(target_feature = "avx2", target_feature = "avx512ifma", target_feature = "neon")
)))]
pub mod scalar_mul;
12 changes: 10 additions & 2 deletions src/backend/vector/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
// Conditionally include the notes if we're on nightly (so we can include docs at all).
#![doc = include_str!("../../../docs/parallel-formulas.md")]

#[cfg(not(any(target_feature = "avx2", target_feature = "avx512ifma", rustdoc)))]
compile_error!("simd_backend selected without target_feature=+avx2 or +avx512ifma");
#[cfg(not(any(target_feature = "avx2", target_feature = "avx512ifma", target_feature = "neon", rustdoc)))]
compile_error!("simd_backend selected without target_feature=+avx2 or +avx512ifma or +neon");

#[cfg(any(
all(target_feature = "avx2", not(target_feature = "avx512ifma")),
Expand All @@ -36,4 +36,12 @@ pub(crate) use self::ifma::{
constants::BASEPOINT_ODD_LOOKUP_TABLE, edwards::CachedPoint, edwards::ExtendedPoint,
};

#[cfg(any(target_feature = "neon", rustdoc))]
#[doc(cfg(target_feature = "neon"))]
pub mod neon;
#[cfg(target_feature = "neon")]
pub(crate) use self::neon::{
constants::BASEPOINT_ODD_LOOKUP_TABLE, edwards::CachedPoint, edwards::ExtendedPoint,
};

pub mod scalar_mul;
Loading