www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - intel-intrinsics v1.13.0

reply Guillaume Piolat <first.nam_e gmail.com> writes:
DUB package intel-intrinsics is out in version v1.13.0.
Now with support for all AVX and AVX2 intrinsics.

- Supported: SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, BMI2, AVX, 
AVX2
- Target x86, x86_64, arm64, arm32. All intrinsics have 
emulation/alt paths.
- DMD, LDC, or GDC

DUB: https://code.dlang.org/packages/intel-intrinsics

Finishing the AVX2 set took a surprisingly long time.

Now: should you use AVX for consumer software in D?
- The reach isn't very good, very nascent support on Microsoft 
Prism and Apple Rosetta.
- In arm, neon vectors are 128-bit anyway.
- You will encounter: https://github.com/dlang/dub/issues/3080 
(unless using redub or --combined)

Typical safe targets for consumer software range imho from SSE3 
to SSE4.2 top.
Dec 06
parent reply Serg Gini <kornburn yandex.ru> writes:
On Sunday, 7 December 2025 at 00:42:11 UTC, Guillaume Piolat 
wrote:
 DUB package intel-intrinsics is out in version v1.13.0.
 Now with support for all AVX and AVX2 intrinsics.

 - Supported: SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, BMI2, AVX, 
 AVX2
 - Target x86, x86_64, arm64, arm32. All intrinsics have 
 emulation/alt paths.
 - DMD, LDC, or GDC
Congratulations! Very nice to have this package.
 Now: should you use AVX for consumer software in D?
I would say - yes as much as you can! If it is not AVX512, but AVX and AVX2 could be applied. Maybe the flow could be started with auto-vec for simpler code maintenance. But nowadays, AVX(2) is supported pretty widely I think. Projects for inspiration could be taken from Lemire and Ash. Their projects SIMD-powered used in other consumer products. simdutf, simdjson, usearch and others https://github.com/lemire (blog https://lemire.me/blog/) https://github.com/ashvardanian (blog https://ashvardanian.com/archives/)
 - The reach isn't very good, very nascent support on Microsoft 
 Prism and Apple Rosetta.
 - In arm, neon vectors are 128-bit anyway.
 - You will encounter: https://github.com/dlang/dub/issues/3080 
 (unless using redub or --combined)
Probably separate ARM targeted arm-intrinsics package could be created with targeting: - NEON - SVE - SVE2
Dec 08
parent Guillaume Piolat <first.nam_e gmail.com> writes:
On Monday, 8 December 2025 at 08:41:55 UTC, Serg Gini wrote:
 Probably separate ARM targeted arm-intrinsics package could be 
 created with targeting:
 - NEON
 - SVE
 - SVE2
(reminder that intel-intrinsics is translated to Neon) Other than for the GATHER instructions, the mismatch isn't large. And lot's of code (eg: stb) uses these intrinsics for anything SIMD. But the next intel-intrinsics will probably need to be arm-intrinsics as x86 fades out (if it fades out, people disagree on that) and maybe do the reverse, translate to x86 intrinsics. It doesn't even need to be in a separate project, as simd-everywhere (the inspiration) translate all <=> all.
Dec 08