polylane 0.13.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 align;
mod layout;
mod simd;
mod simd_scalar;
mod valid_layout;

pub use layout::Layout;
pub use simd::Simd;
pub use simd_scalar::SimdScalar;
pub use valid_layout::ValidLayout;

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

	/// Seal trait for [`crate::simd::SimdScalar`].
	///
	/// # Safety
	///
	/// `DATA_KIND` must be the correct data kind.
	pub unsafe trait SimdScalar {
		const DATA_KIND: DataKind;
	}

	/// Seal trait for [`crate::simd::ValidLayout`].
	///
	/// # Safety
	///
	/// `Align` must have the most strict, possible alignement.
	pub unsafe trait ValidLayout {
		type Align: Align;
	}
}