polylane 0.3.0

Portable and versatile SIMD.
Documentation
// Copyright 2025 Gabriel Bjørnager Jensen.
//
// This Source Code Form is subject to the terms of
// the Mozilla Public License, v. 2.0. If a copy of
// the MPL was not distributed with this file, you
// can obtain one at:
// <https://mozilla.org/MPL/2.0/>.

//! Portable and versatile SIMD.
//!
//! This crate defines SIMD facilities thay may be used on any given platform in any way that ordinary arithmetic primitives are used.
//! SIMD vectors are predefined for all arithmetic primitives up to a maximum, total size of `512` bits; for example:
//!
//! * The largest SIMD vector for [`u8`] is [`u8x64`],
//! * The largest SIMD vector for [`u16`] is [`u16x32`],
//! * The largest SIMD vector for [`u64`] is [`u64x8`],
//! * Etc.
//!
//! All vector types have the largest possible align requirement that does not introduce padding, e.g. [`f32x6`] must be `64`-bit-aligned and [`f32x4`] must be `128`-bit-aligned.

#![no_std]

#![cfg_attr(feature = "f16",  feature(f16))]
#![cfg_attr(feature = "f128", feature(f128))]

extern crate self as polylane;

#[cfg(feature = "alloc")]
extern crate alloc;

#[cfg(feature = "std")]
extern crate std;

pub mod prelude;

mod mask;
mod mask_element;
mod mask_try_from_int_error;
mod simd;
mod simd_element;
mod simd_into_iter;
mod simd_iter;
mod simd_iter_mut;
mod simd_ord;
mod simd_partial_eq;
mod simd_partial_ord;
mod std_float;

pub use mask::*;
pub use mask_element::MaskElement;
pub use mask_try_from_int_error::MaskTryFromIntError;
pub use simd_element::SimdElement;
pub use simd_into_iter::SimdIntoIter;
pub use simd_iter::SimdIter;
pub use simd_iter_mut::SimdIterMut;
pub use simd_ord::SimdOrd;
pub use simd_partial_eq::SimdPartialEq;
pub use simd_partial_ord::SimdPartialOrd;
pub use simd::*;

pub(crate) use simd_element::SealedSimdElement;
pub(crate) use mask_element::SealedMaskElement;

#[cfg(feature = "std")]
pub use std_float::StdFloat;

#[cfg(feature = "std")]
pub(crate) use std_float::SealedStdFloat;