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

//! 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.

#![no_std]

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

extern crate self as polylane;

#[cfg(any(feature = "alloc", doc, test))]
extern crate alloc;

#[cfg(any(feature = "std", doc, test))]
extern crate std;

pub mod cmp;
pub mod mask;
pub mod num;
pub mod prelude;
pub mod simd;

mod compat;
mod detail;

/// Constructs a SIMD vector.
#[macro_export]
macro_rules! simd {
	[$value:expr; $len:expr] => {{
		::polylane::simd::Simd::from_array([$value; $len])
	}};

	[$($value:expr),+$(,)?] => {{
		::polylane::simd::Simd::from_array([$($value, )+])
	}};
}