EstervQrCode 1.1.1
Library for qr code manipulation
simd_intrinsics.hpp
1 // This file is part of OpenCV project.
2 // It is subject to the license terms in the LICENSE file found in the top-level directory
3 // of this distribution and at http://opencv.org/license.html.
4 
5 #ifndef OPENCV_CORE_SIMD_INTRINSICS_HPP
6 #define OPENCV_CORE_SIMD_INTRINSICS_HPP
7 
34 #ifdef __OPENCV_BUILD
35 #error "Use core/hal/intrin.hpp during OpenCV build"
36 #endif
37 
38 #ifdef OPENCV_HAL_INTRIN_HPP
39 #error "core/simd_intrinsics.hpp must be included before core/hal/intrin.hpp"
40 #endif
41 
42 #include "opencv2/core/cvdef.h"
43 
44 #ifdef OPENCV_SIMD_CONFIG_HEADER
45 #include CVAUX_STR(OPENCV_SIMD_CONFIG_HEADER)
46 #elif defined(OPENCV_SIMD_CONFIG_INCLUDE_DIR)
47 #include "opencv_simd_config.hpp" // corresponding directory should be added via -I compiler parameter
48 #else // custom config headers
49 
50 #if (!defined(CV_AVX_512F) || !CV_AVX_512F) && (defined(__AVX512__) || defined(__AVX512F__))
51 # include <immintrin.h>
52 # undef CV_AVX_512F
53 # define CV_AVX_512F 1
54 # ifndef OPENCV_SIMD_DONT_ASSUME_SKX // Skylake-X with AVX-512F/CD/BW/DQ/VL
55 # undef CV_AVX512_SKX
56 # define CV_AVX512_SKX 1
57 # undef CV_AVX_512CD
58 # define CV_AVX_512CD 1
59 # undef CV_AVX_512BW
60 # define CV_AVX_512BW 1
61 # undef CV_AVX_512DQ
62 # define CV_AVX_512DQ 1
63 # undef CV_AVX_512VL
64 # define CV_AVX_512VL 1
65 # endif
66 #endif // AVX512
67 
68 // GCC/Clang: -mavx2
69 // MSVC: /arch:AVX2
70 #if defined __AVX2__
71 # include <immintrin.h>
72 # undef CV_AVX2
73 # define CV_AVX2 1
74 # if defined __F16C__
75 # undef CV_FP16
76 # define CV_FP16 1
77 # endif
78 #endif
79 
80 #endif
81 
82 // SSE / NEON / VSX is handled by cv_cpu_dispatch.h compatibility block
83 #include "cv_cpu_dispatch.h"
84 
85 #include "hal/intrin.hpp"
86 
87 #endif // OPENCV_CORE_SIMD_INTRINSICS_HPP