<div dir="ltr">Hi all,<div><br></div><div>A few weeks ago I chatted with Marshall about adding a P0214 implementation to libc++, and it seemed possible.</div><div><br></div><div>We (Google) do have an implementation (Dimsum, <a href="https://github.com/google/dimsum" target="_blank">https://github.com/google/dimsum</a>), but it's heavily extended, incomplete, and non-conforming. To implement P0214 in libc++, it might be easier to start from scratch.</div><div><br></div><div>Here is the plan:</div><div>(1) C++11 compatible scalar implementation for simd<> and related traits/operations.</div><div>(2) Add an ABI that uses vector registers. Basically, it means to store data by __m128i/__m128 for x86.</div><div>(3) C++11 compatible simplistic implementation for simd_mask<T, ABI> and `where expression` in terms of simd<U, ABI>. U is an unsigned integer with the size sizeof(T).</div><div>(4) (optional and low priority) Implementation of [simd.math]. Start with a scalar + for loop implementation.</div><div>(5) Optimization by specializing on different platforms and use of native intrinsics. But for FWIW, modern compilers are good at auto-vectorizing for-loops and scalar operations, so we might not need that many specializations.</div><div>(6) (libc++ unrelated) Rebase Dimsum onto libc++ and keep Dimsum evolving. We'll propose some of the Dimsum's extensions to the TS.</div><div><br></div><div>Does it sound like a plan?<br></div><div><br></div><div>Thanks!</div></div>