On Tuesday, 2 October 2012 at 21:03:36 UTC, jerro wrote:
SIMD in LDC is currently broken

What problems did you have with it? It seems to work fine for me.

Can you post an example of doing a simple arithmetic with two 'float4's? My simple tests either fail with LLVM errors or don't produce correct results (which reminds me, I meant to report them, I'll do that). Here's an example:


import core.simd, std.stdio;

void main()
{
  float4 a = 1, b = 2;
  writeln((a + b).array); // WORKS: [3, 3, 3, 3]

  float4 c = [1, 2, 3, 4]; // ERROR: "Stored value type does
                           // not match pointer operand type!"
                           // [..a bunch of LLVM error code..]

  float4 c = 0, d = 1;
  c.array[0] = 4;
  c.ptr[1] = 4;
  writeln((c + d).array); // WRONG: [1, 1, 1, 1]
}

Reply via email to