Expand description
§magetypes
Token-gated SIMD types with natural operators.
This crate provides SIMD vector types (f32x8, i32x4, etc.) that use
archmage tokens for safe construction.
§Supported Platforms
- x86-64: x86-64-v3 (128-bit, 256-bit), AVX-512 (512-bit)
- AArch64: NEON (128-bit)
- WASM: SIMD128 (128-bit) - compile with
RUSTFLAGS="-C target-feature=+simd128"
§Example
use archmage::{X64V3Token, SimdToken};
use magetypes::f32x8;
if let Some(token) = X64V3Token::try_new() {
let a = f32x8::splat(token, 1.0);
let b = f32x8::splat(token, 2.0);
let c = a + b; // Natural operators!
println!("Result: {:?}", c.to_array());
}Re-exports§
pub use simd::f32x4;x86-64 pub use simd::f32x8;x86-64 pub use simd::f64x2;x86-64 pub use simd::f64x4;x86-64 pub use simd::i8x16;x86-64 pub use simd::i8x32;x86-64 pub use simd::i16x8;x86-64 pub use simd::i16x16;x86-64 pub use simd::i32x4;x86-64 pub use simd::i32x8;x86-64 pub use simd::u8x16;x86-64 pub use simd::u8x32;x86-64 pub use simd::u16x8;x86-64 pub use simd::u16x16;x86-64 pub use simd::u32x4;x86-64 pub use simd::u32x8;x86-64 pub use simd::u64x2;x86-64 pub use simd::u64x4;x86-64 pub use simd::f32x16;x86-64 and avx512pub use simd::f64x8;x86-64 and avx512pub use simd::i8x64;x86-64 and avx512pub use simd::i16x32;x86-64 and avx512pub use simd::i32x16;x86-64 and avx512pub use simd::i64x8;x86-64 and avx512pub use simd::u8x64;x86-64 and avx512pub use simd::u16x32;x86-64 and avx512pub use simd::u32x16;x86-64 and avx512pub use simd::u64x8;x86-64 and avx512pub use archmage;
Modules§
- simd
x86-64 or AArch64 or WebAssembly - Token-gated SIMD types with natural operators.
Traits§
- Width
Dispatch - Trait providing access to all SIMD sizes from a capability token.