Any usable SIMD implementation?

Iain Buclaw via Digitalmars-d digitalmars-d at puremagic.com
Thu Apr 14 01:21:22 PDT 2016


On 13 April 2016 at 13:14, Walter Bright via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
> 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

An alternative interface needs to be invented anyway for other CPUs.


More information about the Digitalmars-d mailing list