std::simd
Vectors of numbers kept in SIMD registers, so one operation works on every lane at once. vec(T, n) is the vector of n Ts (ints of up to 64 bits or f32/f64; n a power of two, 64 bytes at most); the usual ones have names. Two vectors of one type add, subtract and multiply lane by lane (int lanes wrap, as SIMD does), float lanes divide too and int lanes take & | ^, - negates every lane, v[i] reads or writes lane i (checked, as an array's index is), and a { } literal lists the lanes ({} is every lane 0).
Source: std/simd.volt
Functions
std::simd::vec
comptime fn vec(T: type, n: usize) -> typethe vector of n lanes of T
std::simd::lane
comptime fn lane(V: type) -> typewhat each of V's lanes holds
std::simd::lanes
comptime fn lanes(V: type) -> usizehow many lanes V has
std::simd::splat
<V: type> fn splat(x: lane(V)) -> Vthe vector with x in every lane: splat<std::simd::f64x4>(1.0)
std::simd::sum
<V: type> fn sum(v: V) -> lane(V)v's lanes added up
std::simd::load
<V: type> fn load(xs: lane(V)[..]) -> Vthe vector of xs' first lanes: load<std::simd::f64x4>(xs[i..]) (xs has at least that many)
std::simd::store
<V: type> fn store(v: V, xs: lane(V)[..]) -> voidv's lanes into xs' first elements (xs has at least as many)