polylane 0.3.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 core::f32;
use polylane::prelude::*;

#[test]
fn test_mask_values() {
	let mut lhs = f32x7::splat(3.1);
	let     rhs = f32x7::splat(f32::consts::PI);

	lhs.as_mut_array()[0x5] = 3.2;

	assert_eq!(
		lhs.simd_lt(rhs).to_int().to_array(),
		[
			-0x1,
			-0x1,
			-0x1,
			-0x1,
			-0x1,
			 0x0,
			-0x1,
		],
	);

	assert_eq!(
		lhs.simd_ge(rhs).to_int().to_array(),
		[
			 0x0,
			 0x0,
			 0x0,
			 0x0,
			 0x0,
			-0x1,
			 0x0,
		],
	);
}