The state of core.simd

Manu turkeyman at gmail.com
Mon Jun 3 03:58:45 PDT 2013


On 3 June 2013 06:38, Benjamin Thaut <code at benjamin-thaut.de> wrote:

> Am 01.06.2013 12:18, schrieb Benjamin Thaut:
>
>> I've taken a look at core.simd and I have to say is unuseable. In a very
>>
>> small test program I already found 3 bugs
>>
>
I've responded in the bugs, but I'll post here too.

1) Using debug symbols together with core.simd will cause a ICE
>> http://d.puremagic.com/issues/**show_bug.cgi?id=10224<http://d.puremagic.com/issues/show_bug.cgi?id=10224>
>>
>
Yup, this has bugged me a few times, but I hadn't pestered Walter yet.

I usually debug SIMD code with -O -release though, and I don't think -g is
compatible with those flags anyway in DMD(?)
I just use visual studio's asm debugging to see what's going on.

2) The STOUPS instruction is not correctly implemented:
>> http://d.puremagic.com/issues/**show_bug.cgi?id=10225<http://d.puremagic.com/issues/show_bug.cgi?id=10225>
>>
>
True.
I never use unaligned vectors ;)

3) The XMM register allocation is catastrophic:
>> http://d.puremagic.com/issues/**show_bug.cgi?id=10226<http://d.puremagic.com/issues/show_bug.cgi?id=10226>
>>
>
What do you get when you remove the explicit mov's?

    float4 result = [1,2,3,4];
    result = __simd(XMM.ADDPS, result, result);
    writefln("%s", result.array);


Whats the current state of core.simd? Is it still beeing worked on?
>> Because it its current state its pretty much unuseable.
>>
>
I find it 'usable', but there are still some holes, and cases where it's
not efficient.
I've been working on std.simd (but was afk for the start of this year)
mostly against GDC. Once I'm happy with the API and it's producing the
correct code in GDC/LDC, then I planned to log a bunch of DMD bugs to get
that up to scratch. But I needed a solid goal-post and units tests first..

I'm back on std.simd now (although haven't had anywhere near as much time
as I'd like lately). Hopefully show some significant progress soon.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130603/9c5e6a83/attachment.html>


More information about the Digitalmars-d mailing list