SOMHunter Core
intrinsics.h
Go to the documentation of this file.
1 /* This file is part of SOMHunter.
2  *
3  * Copyright (C) 2021 Frantisek Mejzlik <frankmejzlik@protonmail.com>
4  * Mirek Kratochvil <exa.exa@gmail.com>
5  * Patrik Vesely <prtrikvesely@gmail.com>
6  *
7  * SOMHunter is free software: you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License as published by the Free
9  * Software Foundation, either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * SOMHunter is distributed in the hope that it will be useful, but WITHOUT ANY
13  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
15  * details.
16  *
17  * You should have received a copy of the GNU General Public License along with
18  * SOMHunter. If not, see <https://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef use_intrins_h
22 
23 /* MSVC does not define SSE* flags therefore we just try to turn in on,
24  * if your CPU does not support this, you'll get compilation error. */
25 # if (defined(__SSE4_2__) || defined(_MSC_VER))
26 # define USE_INTRINS
27 # else
28 # pragma message("Fix your CXXFLAGS or get a better CPU!")
29 # endif
30 
31 # ifdef USE_INTRINS
32 # if defined(_MSC_VER)
33 # include <wmmintrin.h>
34 # else
35 # include <xmmintrin.h>
36 # endif
37 # endif
38 
39 #endif // use_intrins_h