#[non_exhaustive]#[repr(u8)]pub enum Backend {
Scalar = 0,
Neon = 1,
Sse2 = 2,
Avx2 = 3,
Avx512 = 4,
Wasm128 = 5,
}Expand description
Which fill_segment implementation to use.
A variant is added every time another ISA is ported, so this is
#[non_exhaustive] — write a _ arm downstream. Backend::ALL is a
slice for the same reason: its length must not be part of the API.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Scalar = 0
Portable scalar code. Always available.
Neon = 1
AArch64 NEON.
Sse2 = 2
x86 / x86-64 SSE2.
Avx2 = 3
x86-64 AVX2.
Avx512 = 4
x86-64 AVX-512F.
Wasm128 = 5
wasm32 fixed-width SIMD128. Compile-time selected; see wasm128.
Implementations§
Source§impl Backend
impl Backend
Sourcepub const fn name(self) -> &'static str
pub const fn name(self) -> &'static str
Short lowercase name, handy for bench ids and test output.
Sourcepub fn is_available(self) -> bool
pub fn is_available(self) -> bool
Whether this CPU can execute this backend right now.
Unlike detect, this asks about one specific backend, so tests and
benches can loop over Backend::ALL and skip what the host cannot run.
Trait Implementations§
impl Copy for Backend
impl Eq for Backend
Source§impl Ord for Backend
impl Ord for Backend
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Backend
impl PartialOrd for Backend
impl StructuralPartialEq for Backend
Auto Trait Implementations§
impl Freeze for Backend
impl RefUnwindSafe for Backend
impl Send for Backend
impl Sync for Backend
impl Unpin for Backend
impl UnsafeUnpin for Backend
impl UnwindSafe for Backend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more