intel-intrinsics 1.0.1

Reuse your C++ SIMD code using Intel intrinsics syntax. Works with LDC.

To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:


The goal is to allow you to use Intel intrinsics in D code.

Why Intel intrinsic syntax? Because it is more familier to C++ programmers and there is a convenient online guide provided by Intel:

For now only LDC is supported. But be sure to know about the superior SIMD capabilities of LDC exposed in ldc.simd.


import inteli.xmmintrin; // allows SSE1 intrinsics
import inteli.emmintrin; // allows SSE2 intrinsics

// distance between two points in 4D
float distance(float[4] a, float[4] b) nothrow @nogc
    __m128 va = _mm_loadu_ps(a.ptr);
    __m128 vb = _mm_loadu_ps(b.ptr);
    __m128 diffSquared = _mm_sub_ps(va, vb);
    diffSquared = _mm_mul_ps(diffSquared, diffSquared);
    __m128 sum = _mm_add_ps(diffSquared, _mm_srli_si128!8(diffSquared));
    sum = _mm_add_ps(sum, _mm_srli_si128!4(sum));
    return _mm_cvtss_f32(_mm_sqrt_ss(sum));
assert(distance([0, 2, 0, 0], [0, 0, 0, 0]) == 2);

Supported instructions set

  • SSE1
  • SSE2
1.11.9 2023-May-22
1.11.8 2023-May-09
1.11.7 2023-May-01
1.11.6 2023-Apr-30
1.11.5 2023-Apr-30
Show all 99 versions
Download Stats:
  • 25 downloads today

  • 202 downloads this week

  • 1025 downloads this month

  • 105519 downloads total

Short URL: