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

#![cfg(test)]

use polylane::prelude::*;
use polylane::simd;

#[test]
fn test_simd_uint() {
	let mut v: Simd<u8, 8> = simd![
		0,
		1,
		2,
		3,
		4,
		5,
		6,
		7,
	];

	v = v.wrapping_sub(Simd::splat(1));

	assert_eq!(
		v,
		simd![
			255,
			000,
			001,
			002,
			003,
			004,
			005,
			006,
		],
	);

	assert_eq!(
		v.cast_signed(),
		simd![
			-1,
			 0,
			 1,
			 2,
			 3,
			 4,
			 5,
			 6,
		],
	);
}