Potential bug in double_m operator==
Matthias Kretz
[please enable javascript to see the address]
Fri Jun 13 12:33:42 CEST 2014
Ah, now I found our difference. I was testing this with the 0.7 branch. You're
right, on master the problem persists for SSE4.
I'll add model 60 to OptimizeForArchitecture. Thanks.
-Matthias
On Friday 13 June 2014 12:06:03 Georgios Bitzes wrote:
> operator== in sse/mask.h:112 is defined as MaskHelper<Size>::cmpeq (d.v(),
> rhs.d.v())
> And if VC_USE_PTEST is defined, cmpeq is still using testc (sse/mask.h:33)
> 0 != _mm_testc_si128(_mm_castps_si128(x), _mm_castps_si128(y));
>
> mask_sse does succeed, but that's only because the auto-detection for
> architecture fails on my Haswell, so it builds mask_sse without sse4:
> CMake Warning at cmake/OptimizeForArchitecture.cmake:110 (message):
> Your CPU (family 6, model 60) is not known. Auto-detection of
> optimization
> flags failed and will use the 65nm Core 2 CPU settings.
> Call Stack (most recent call first):
> cmake/OptimizeForArchitecture.cmake:159 (AutodetectHostArchitecture)
> cmake/VcMacros.cmake:389 (OptimizeForArchitecture)
> CMakeLists.txt:117 (vc_set_preferred_compiler_flags)
>
> However, if I add the model number in OptimizeForArchitecture:
> if(_cpu_model EQUAL 60)
> set(TARGET_ARCHITECTURE "ivy-bridge")
>
> The test then fails:
> FAIL: ┍ at /home/gbitzes/vc/vc/tests/mask.cpp:457 (0x42c26d): !(a == b)
> FAIL: ┕ testCompareOperators<float_v>
> FAIL: ┍ at /home/gbitzes/vc/vc/tests/mask.cpp:457 (0x43118d): !(a == b)
> FAIL: ┕ testCompareOperators<short_v>
> FAIL: ┍ at /home/gbitzes/vc/vc/tests/mask.cpp:457 (0x43338d): !(a == b)
> FAIL: ┕ testCompareOperators<ushort_v>
> FAIL: ┍ at /home/gbitzes/vc/vc/tests/mask.cpp:457 (0x43763d): !(a == b)
> FAIL: ┕ testCompareOperators<int_v>
> FAIL: ┍ at /home/gbitzes/vc/vc/tests/mask.cpp:457 (0x43cb41): !(a == b)
> FAIL: ┕ testCompareOperators<double_v>
> FAIL: ┍ at /home/gbitzes/vc/vc/tests/mask.cpp:457 (0x441ced): !(a == b)
> FAIL: ┕ testCompareOperators<uint_v>
>
> Maybe it's also not detecting properly SSE4 support for your machine, too?
> Have you tried just running the example in my first post using -msse4.2?
>
> Cheers,
> Georgios
--
─────────────────────────────────────────────────────────────
Dipl.-Phys. Matthias Kretz
Phone: +49 69 798 44110
Web: http://compeng.uni-frankfurt.de/?mkretz
SIMD easy and portable: http://compeng.uni-frankfurt.de/?vc
─────────────────────────────────────────────────────────────
More information about the Vc
mailing list