Any usable SIMD implementation?

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Wed Apr 13 04:14:48 PDT 2016


On 4/13/2016 3:58 AM, Marco Leise wrote:
> How about this style as an alternative?:
>
> immutable bool mmx;
> immutable bool hasPopcnt;
>
> shared static this()
> {
>      import gcc.builtins;
>      mmx       = __builtin_cpu_supports("mmx"   ) > 0;
>      hasPopcnt = __builtin_cpu_supports("popcnt") > 0;
> }
>

Please do not invent an alternative interface, use the one in core.cpuid:

    http://dlang.org/phobos/core_cpuid.html#.mmx


More information about the Digitalmars-d mailing list