polylane 0.10.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/>.

//! [`Simd`] and associated facilities.

mod alignement;
mod into_iter;
mod iter;
mod iter_mut;
mod layout;
mod simd;
mod simd_scalar;
mod valid_layout;

pub use into_iter::IntoIter;
pub use iter::Iter;
pub use iter_mut::IterMut;
pub use layout::Layout;
pub use simd::Simd;
pub use simd_scalar::SimdScalar;
pub use valid_layout::ValidLayout;

use alignement::*;

pub(crate) mod seal {
	use crate::detail::DataKind;
	use crate::simd::Alignement;

	/// # Safety
	///
	/// `DATA_KIND` must be the correct data kind.
	pub unsafe trait SimdScalar {
		const DATA_KIND: DataKind;
	}

	/// # Safety
	///
	/// `Alignement` must have the most strict, possible alignement.
	pub unsafe trait ValidLayout {
		type Alignement: Alignement;
	}
}