You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SIMD vector type: c_import omits every C vector type (#1872) because With has no vector type to spell it as #1874
#1872 makes c_import omit C vector types (__attribute__((vector_size)), MSVC <intrin.h>'s _tile1024i, __m128 …): With has no SIMD vector type, and an array spelling would lie about the ABI (vectors are passed in vector registers). Every function or record using one is omitted or opaque, loudly at a use.
That is correct today and wrong forever: SSE/AVX/NEON intrinsics headers, SDL's SIMD helpers and image/audio code all reach these types. A language-level Vector[N, T] (Zig @Vector(N, T), Mojo SIMD[T, N], Rust std::simd — verify in .reference/) with the target's vector ABI in FnAbi/TypeLayout would let c_import present them. Needs a ruling (spelling, which ops, ABI per target) before implementation.
Ruling (Eric, 2026-09-29): implement it properly — a language-level SIMD vector type, in scope. Eric picks the spelling from a list of candidates (brief in progress); the spec wording follows his pick, then c_import maps C vector types onto it.
Implemented on main: 6719bda (#1927) — Vector[N, T], Mask[N, W], the aliases, lane-wise operators with scalar broadcast, m.select, masks, generic lane counts, 128-bit lanes, and c_import of C vector types, per spec v7.11/v7.14/v7.16 (D78, D80). Stack battery green on 3b9d06a.
Activity
ehartford commentedon Sep 29, 2026
Ruling (Eric, 2026-09-29): implement it properly — a language-level SIMD vector type, in scope. Eric picks the spelling from a list of candidates (brief in progress); the spec wording follows his pick, then c_import maps C vector types onto it.
ehartford commentedon Sep 29, 2026
Spec v7.11 landed the blessed words (D78): §4.3d Vector Types, §16.1 C vector types. Implementation next; the compiler is non-compliant until then.
Spec v7.11 (D78): SIMD vectors — Vector[N, T] with one-token aliases,…
Spec v7.11 (D78): SIMD vectors — Vector[N, T] with one-token aliases,…
Spec v7.11–v7.13 (D78, D79): SIMD vectors; the unsafe callable type; …
Spec v7.14 (D80): SIMD masks and lane selection — m.select(a, b), bro…
SIMD vectors (#1874): Vector[N, T], Mask[N, W], lane-wise operators, …
ehartford commentedon Sep 30, 2026
Implemented on main: 6719bda (#1927) — Vector[N, T], Mask[N, W], the aliases, lane-wise operators with scalar broadcast, m.select, masks, generic lane counts, 128-bit lanes, and c_import of C vector types, per spec v7.11/v7.14/v7.16 (D78, D80). Stack battery green on 3b9d06a.