XMM Intrinsics

Simen Kjærås simen.kjaras at gmail.com
Fri May 8 12:49:00 UTC 2020


On Friday, 8 May 2020 at 12:38:51 UTC, Marcio Martins wrote:
> Hi,
>
> I am building a CRC32C implementation using SSE for D, because 
> I couldn't find any readily available :[
>
> However, I am unable to find any documentation regarding which 
> SSE instructions are available and how I could use them in D. I 
> can see core.simd can't seem to make any use of it.
>
> How would I go about calling _mm_* functions in D in a way that 
> is portable between D compilers?

You would use core.simd:

https://dlang.org/library/core/simd.html


Sadly, the supported instructions are not documented on that 
page, and you'll need to look at the source to get at them:

https://github.com/dlang/druntime/blob/master/src/core/simd.d#L85-L384

(I'll file a bug on this)


There's a bit more info on D SIMD instructions here:

https://dlang.org/spec/simd.html

--
   Siomen


More information about the Digitalmars-d-learn mailing list