Fix for ClangCl missing F16C intrinsics in qfloat16.h
Done-with: Thiago Macieira <thiago.macieira@intel.com> Fixes: QTBUG-101175 Change-Id: I46ef5c473f174e54a8cffffd16e5334d3b5944b8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This commit is contained in:
parent
860b8d00ca
commit
f3640d9086
@ -48,10 +48,11 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__AVX2__) && !defined(__F16C__)
|
#if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__AVX2__) && !defined(__F16C__)
|
||||||
// All processors that support AVX2 do support F16C too. That doesn't mean
|
// All processors that support AVX2 do support F16C too, so we could enable the
|
||||||
// we're allowed to use the intrinsics directly, so we'll do it only for
|
// feature unconditionally if __AVX2__ is defined. However, all currently
|
||||||
// the Intel and Microsoft's compilers.
|
// supported compilers except Microsoft's are able to define __F16C__ on their
|
||||||
# if defined(Q_CC_INTEL) || defined(Q_CC_MSVC)
|
// own when the user enables the feature, so we'll trust them.
|
||||||
|
# if defined(Q_CC_MSVC) && !defined(Q_CC_CLANG)
|
||||||
# define __F16C__ 1
|
# define __F16C__ 1
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user