Portable SIMD

Henri Sivonen

Lanes of Primitives

  • u8x16
  • u16x8
  • f32x4
  • m8x16 (for true, all bits of lane set to 1)

ALU Code Works on Any ISA

40u32 + 2u32

ISA-Specific SIMD



packed_simd by gnzlbg

a + b (both u8x16)

Mask/Boolean Vectors

  • Returned by lane-wise comparisons
  • Reduced to bool by any()/all()/none()


Transmute to vendor type, use intrinsics in tiny always-inlined functions.


reveal.js used under its MIT license. highlight.js used under its BSD license. Fira Sans and Fira Mono used under the Open Font License 1.1.

Text copyright Mozilla Foundation; licensed under Creative Commons Attribution-ShareAlike 3.0 United States or, at your option, any later version.