Warning, file /include/QtCore/qsimd.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005 #ifndef QSIMD_H
0006 #define QSIMD_H
0007
0008 #include <QtCore/qglobal.h>
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035 #define QT_COMPILER_USES(feature) (1/QT_COMPILER_USES_##feature == 1)
0036
0037 #if defined(Q_PROCESSOR_ARM) && defined(__ARM_NEON) || defined(__ARM_NEON__)
0038 # include <arm_neon.h>
0039 # define QT_COMPILER_USES_neon 1
0040 #else
0041 # define QT_COMPILER_USES_neon -1
0042 #endif
0043
0044 #if defined(Q_PROCESSOR_MIPS) && (defined(__MIPS_DSP__) || (defined(__mips_dsp) && defined(Q_PROCESSOR_MIPS_32)))
0045 # define QT_COMPILER_USES_mips_dsp 1
0046 #else
0047 # define QT_COMPILER_USES_mips_dsp -1
0048 #endif
0049
0050 #if defined(Q_PROCESSOR_MIPS) && (defined(__MIPS_DSPR2__) || (defined(__mips_dspr2) && defined(Q_PROCESSOR_MIPS_32)))
0051 # define QT_COMPILER_USES_mips_dspr2 1
0052 #else
0053 # define QT_COMPILER_USES_mips_dspr2 -1
0054 #endif
0055
0056 #if defined(Q_PROCESSOR_X86) && defined(Q_CC_MSVC)
0057
0058 # if (defined(_M_X64) || _M_IX86_FP >= 2) && defined(QT_COMPILER_SUPPORTS_SSE2)
0059 # define __SSE__ 1
0060 # define __SSE2__ 1
0061 # endif
0062 # if (defined(_M_AVX) || defined(__AVX__))
0063
0064
0065 # define __SSE3__ 1
0066 # define __SSSE3__ 1
0067 # define __SSE4_1__ 1
0068 # define __SSE4_2__ 1
0069 # define __POPCNT__ 1
0070 # ifndef __AVX__
0071 # define __AVX__ 1
0072 # endif
0073 # endif
0074 # ifdef __SSE2__
0075 # define QT_VECTORCALL __vectorcall
0076 # endif
0077 # ifdef __AVX2__
0078
0079 # define __F16C__ 1
0080 # define __RDRND__ 1
0081 # define __FMA__ 1
0082 # define __BMI__ 1
0083 # define __BMI2__ 1
0084 # define __MOVBE__ 1
0085 # define __LZCNT__ 1
0086 # endif
0087
0088 #endif
0089
0090 #if defined(Q_PROCESSOR_X86) && defined(__SSE2__)
0091 # include <immintrin.h>
0092 # define QT_COMPILER_USES_sse2 1
0093 #else
0094 # define QT_COMPILER_USES_sse2 -1
0095 #endif
0096
0097 #if defined(Q_PROCESSOR_X86) && defined(__SSE3__)
0098 # define QT_COMPILER_USES_sse3 1
0099 #else
0100 # define QT_COMPILER_USES_sse3 -1
0101 #endif
0102
0103 #if defined(Q_PROCESSOR_X86) && defined(__SSSE3__)
0104 # define QT_COMPILER_USES_ssse3 1
0105 #else
0106 # define QT_COMPILER_USES_ssse3 -1
0107 #endif
0108
0109 #if defined(Q_PROCESSOR_X86) && defined(__SSE4_1__)
0110 # define QT_COMPILER_USES_sse4_1 1
0111 #else
0112 # define QT_COMPILER_USES_sse4_1 -1
0113 #endif
0114
0115 #if defined(Q_PROCESSOR_X86) && defined(__SSE4_2__)
0116 # define QT_COMPILER_USES_sse4_2 1
0117 #else
0118 # define QT_COMPILER_USES_sse4_2 -1
0119 #endif
0120
0121 #if defined(Q_PROCESSOR_X86) && defined(__AVX__)
0122 # define QT_COMPILER_USES_avx 1
0123 #else
0124 # define QT_COMPILER_USES_avx -1
0125 #endif
0126
0127 #ifndef QT_VECTORCALL
0128 #define QT_VECTORCALL
0129 #endif
0130
0131 QT_BEGIN_NAMESPACE
0132 QT_END_NAMESPACE
0133
0134 #endif