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

#[cfg(target_arch = "x86")]
#[allow(unused_imports)]
use core::arch::x86::*;

#[cfg(target_arch = "x86_64")]
#[allow(unused_imports)]
use core::arch::x86_64::*;

/// Denotes a native SIMD vector type.
pub(crate) trait NativeSimd: Copy {}

macro_rules! native_simds {
	{ $($Ty:ty),*$(,)? } => {$(
		impl ::polylane::detail::NativeSimd for $Ty {}
	)*};
}

#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
native_simds! {
	__m128,
	__m128bh,
	__m128d,
	__m128i,
	__m256,
	__m256bh,
	__m256d,
	__m256i,
	__m512,
	__m512bh,
	__m512d,
	__m512i,
}