polylane 0.15.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.

pub(crate) mod align;

mod simd;
mod simd_layout;
mod simd_scalar;

pub use simd::Simd;
pub use simd_layout::SimdLayout;
pub use simd_scalar::SimdScalar;

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

	/// Seal trait for [`crate::simd::SimdScalar`].
	///
	/// # Safety
	///
	/// `DATA_KIND` must be the correct data kind.
	/// `ZEROED` and `ONED` must be composed of only zero and one bits (excluding padding), respectively.
	pub unsafe trait SimdScalar {
		const DATA_KIND: DataKind;

		const ZEROED: Self;

		const ONED: Self;
	}
}