FIAS . Impressum . Privacy

Potential bug in double_m operator==

Georgios Bitzes [please enable javascript to see the address]
Thu Jun 12 12:15:28 CEST 2014


There's one more piece of information to add: The bug seems to be present
in SSE4.1/4.2, AVX, AVX2 but not SSE2 or SSE3. Tested both with gcc and
icc, so the bug is likely in Vc, not the compilers.

With -msse, -msse2, -msse3, -mssse3
m[11]
m[00]
0

-msse4.1, -msse4.2
m[11]
m[00]
1

-mavx, -mavx2
m[1111]
m[0000]
1

Cheers,
Georgios


[please enable javascript to see the address]>
wrote:

> Hi Matthias,
>
> Have a look at the snippet below, it's producing strange output:
> #include <Vc/Vc>
>
> using namespace Vc;
> int main() {
>    double_m a(Vc::One);
>    double_m b(Vc::Zero);
>    std::cout << a << std::endl;
>    std::cout << b << std::endl;
>    std::cout << (a == b) << std::endl;
> }
>
> The output I get is:
> m[1111]
> m[0000]
> 1
>
> Clearly, the two masks are not equal so the last line should be 0.. Could
> you confirm if this is a bug?
>
> Tested
> with a1d8b9fc31060d870386613cc72319546c850b87, f692ec56aa28204f2166571c5c30ec6cdcfaaecd,
> both producing identical output.
>
> Thanks,
> Georgios
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://compeng.uni-frankfurt.de/pipermail/vc/attachments/20140612/ac6e872a/attachment.html>


More information about the Vc mailing list
FIAS . Impressum . Privacy