avx512 usage

Johan Engelen j at j.nl
Sun Jan 21 13:09:29 UTC 2018


On Sunday, 21 January 2018 at 12:52:41 UTC, Igor Shirkalin wrote:
> Hello,
>
> we use LDC to dynamically select compiled and optimized code 
> with particular instructions set with help of @target pragma. 
> To make this we take core.cpu module, but it can't detect 
> avx512 instructions presence. Does LDC have its own some cpu 
> instruction detection runtime routine(s) to make use of 
> avx512-set?

You can use mir.cpuid:
https://code.dlang.org/packages/mir-cpuid
https://github.com/libmir/mir-cpuid

( It would be great if you could write an article about how you 
use dynamic selection and @target. It will be very helpful for 
other D programmers. Contact Mike Parker if you want to write 
something for the D blog, where he can help writing. 
https://github.com/mdparker . Thanks! )

-Johan




More information about the digitalmars-d-ldc mailing list