- edited description
Fix SIMD for x64 with MSVC
The SIMD settings https://bitbucket.org/blaze-lib/blaze/src/f8445b46a7ac1590d9760977055413d6134fbf85/blaze/system/Vectorization.h#lines-123,140 are not triggered on x64
for MSVC, since MSVC neither defines __SSE__
nor __SSE2__
. And _M_IX86_FP
is only defined with x86
.
It seems MSVC enables SSE/SSE2 with x64
by default. So similarly to this commit https://github.com/cdwfs/mathfu/commit/16f8fa5e779e62f29c9b3f1f7c12942f195d860f?branch=16f8fa5e779e62f29c9b3f1f7c12942f195d860f&diff=split the solution is to simply change the checks to this:
#if BLAZE_USE_VECTORIZATION && ( defined(__SSE__) || ( _M_IX86_FP > 0 ) || defined(_M_AMD64) || defined(_M_X64) )
...
#if BLAZE_USE_VECTORIZATION && ( defined(__SSE2__) || ( _M_IX86_FP > 1 ) || defined(_M_AMD64) || defined(_M_X64) )
Comments (7)
-
reporter -
Hi Phil!
Thanks a lot for catching this problem. We’ll update the SSE flags immediately.
Best regards,
Klaus!
-
-
assigned issue to
-
assigned issue to
-
- changed status to open
-
- changed status to resolved
Commit 5fd8caa fixes the SSE and SSE2 mode for MSVC and x64. The fix is immediately available via cloning the Blaze repository and will be officially released in Blaze 3.9.
-
reporter - edited description
-
reporter Perfect, thank you.
- Log in to comment