polylane 0.9.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::*;

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

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

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

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