use crate::consts::F1600_ROUNDS;
use crate::types::*;
#[cfg(feature = "parallel")]
use hybrid_array::ArraySize;
#[cfg(target_arch = "aarch64")]
pub(crate) mod aarch64_sha3;
#[cfg(any(
keccak_backend = "simd128",
keccak_backend = "simd256",
keccak_backend = "simd512",
))]
pub(crate) mod simd;
pub(crate) mod soft;
pub trait BackendClosure {
fn call_once<B: Backend>(self);
}
pub trait Backend {
#[cfg(feature = "parallel")]
type ParSize1600: ArraySize;
#[must_use]
fn get_p1600<const ROUNDS: usize>() -> Fn1600;
#[cfg(feature = "parallel")]
#[inline]
#[must_use]
fn get_par_p1600<const ROUNDS: usize>() -> ParFn1600<Self> {
|par_state| par_state.iter_mut().for_each(Self::get_p1600::<ROUNDS>())
}
#[must_use]
fn get_f1600() -> Fn1600 {
Self::get_p1600::<F1600_ROUNDS>()
}
#[cfg(feature = "parallel")]
#[inline]
#[must_use]
fn get_par_f1600() -> ParFn1600<Self> {
Self::get_par_p1600::<F1600_ROUNDS>()
}
}