polylane 0.9.0

Portable and versatile SIMD.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// 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/>.

use core::marker::PhantomData;

/// Denotes a SIMD layout.
///
/// This type is defined so that allowed <code>[Simd](crate::simd::Simd)&lt;T, N&gt;</code> instances may be predicated via `Layout<T, N>` implementing [`ValidLayout`](crate::simd::ValidLayout).
///
/// Additionally, a special case made for where `T = bool`: This denotes a layout for <code>[Mask](crate::mask::Mask)&lt;N&gt;</code>.
pub struct Layout<T, const N: usize> {
	_phantom: PhantomData<fn() -> [T; N]>,
}