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" - All other targets: Scalar fallback (pure array math, no hardware SIMD)
§Example
use archmage::{X64V3Token, SimdToken};
use magetypes::simd::f32x8;
if let Some(token) = X64V3Token::summon() {
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 archmage;
Modules§
- cast
- Cross-tier casting utilities.
- prelude
- Platform-appropriate SIMD types without manual
#[cfg]blocks. - simd
- Token-gated SIMD types with natural operators.
Traits§
- Simd
Types - Trait that associates SIMD vector types with a capability token.
- Width
Dispatch - Trait providing access to all SIMD sizes from a capability token.