Thread overview
[Issue 15956] Incorrect value inside enum using simd vectors, weird tym errors, and weird if(true) {} partial solution.
Nov 20, 2016
Walter Bright
Oct 01, 2018
joeks@mail.de
Oct 01, 2018
joeks@mail.de
Oct 01, 2018
joeks@mail.de
Oct 12, 2018
joeks@mail.de
Oct 12, 2018
joeks@mail.de
November 20, 2016
https://issues.dlang.org/show_bug.cgi?id=15956

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |SIMD
                 CC|                            |bugzilla@digitalmars.com

--
October 01, 2018
https://issues.dlang.org/show_bug.cgi?id=15956

joeks@mail.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |joeks@mail.de
           Severity|major                       |critical

--
October 01, 2018
https://issues.dlang.org/show_bug.cgi?id=15956

--- Comment #1 from joeks@mail.de ---
As far as I can tell this problem stems from the fact, that some of the types
in core.simd are not working AT ALL.
Consider this simple example:
    double4 f;
    f[0] = 1.0;
    f[1] = 2.0;
    f[2] = 3.0;
    f[3] = 4.0;
    writeln(f);
This outputs: [1, 2, 0, 6.95325e-310]

I wonder has noone ever tried to use this type in any program or did not notice this obviously completely wrong result?

--
October 01, 2018
https://issues.dlang.org/show_bug.cgi?id=15956

--- Comment #2 from joeks@mail.de ---
As far as I can tell this problem stems from the fact, that some of the types
in core.simd are not working AT ALL.
Consider this simple example:
    double4 f;
    f[0] = 1.0;
    f[1] = 2.0;
    f[2] = 3.0;
    f[3] = 4.0;
    writeln(f);
This outputs: [1, 2, 0, 6.95325e-310]

I wonder has noone ever tried to use this type in any program or did not notice this obviously completely wrong result?

Edit: Does work correctly with gdc.

--
October 12, 2018
https://issues.dlang.org/show_bug.cgi?id=15956

joeks@mail.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal

--- Comment #3 from joeks@mail.de ---
My example seems to be working now, could be that this has been fixed in 2.082.1.

But I have not yet tested the original example.

--
October 12, 2018
https://issues.dlang.org/show_bug.cgi?id=15956

joeks@mail.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from joeks@mail.de ---
Tried it now, seems to work, too.


with the constructor:

this(in float4 arr) {
    vec = arr;
}

the output is correct for both variables.
However the compile error with the float[4] accepting constructor is is still
there. Also it did not matter if the 'if anything' was present or not.

I suppose this is a different issue (or a feature?) and should therefore be addressed in a different thread.

-> This can be closed?

--