Portable SIMD

Henri Sivonen
Mozilla

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

core::arch::x86_64::_mm_add_epi8

core::arch::aarch64::vadd_u8

packed_simd by gnzlbg

a + b (both u8x16)

Mask/Boolean Vectors

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

Escape?

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

https://github.com/rust-lang/packed_simd

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.