SSE2 - Streaming SIMD Extensions

Back

Terminology

  • ps: packed single-precision(float)
  • pd: packed double-precision(double)
  • pi: packed integer

Understanding an instruction

// set packed single precision is the xmm register
__mm_set_ps1(0.1f) // sets 0.1f to all four lanes of the XMM register
__mm_set_ps(0.1f, 0.2f, 0.3f, 0.4f) // sets 0.1f, 0.2f, 0.3f, 0.4f in the lanes of the XXM
// multiply packed single precision is the xmm register
__mm_mul_ps(xs, ys)

Reference