Skip to content

Commit

Permalink
don't use simd for solana os
Browse files Browse the repository at this point in the history
  • Loading branch information
yihau committed Jul 15, 2024
1 parent 5312a03 commit 2f4f29e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions curve25519-dalek/src/backend/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ enum BackendKind {

#[inline]
fn get_selected_backend() -> BackendKind {
#[cfg(all(curve25519_dalek_backend = "simd", nightly))]
#[cfg(all(curve25519_dalek_backend = "simd", nightly, not(target_os = "solana")))]
{
cpufeatures::new!(cpuid_avx512, "avx512ifma", "avx512vl");
let token_avx512: cpuid_avx512::InitToken = cpuid_avx512::init();
Expand All @@ -62,7 +62,7 @@ fn get_selected_backend() -> BackendKind {
}
}

#[cfg(curve25519_dalek_backend = "simd")]
#[cfg(all(curve25519_dalek_backend = "simd", not(target_os = "solana")))]
{
cpufeatures::new!(cpuid_avx2, "avx2");
let token_avx2: cpuid_avx2::InitToken = cpuid_avx2::init();
Expand Down

0 comments on commit 2f4f29e

Please sign in to comment.