Grok  7.6.6
CPUArch.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016-2021 Grok Image Compression Inc.
3  *
4  * This source code is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Affero General Public License, version 3,
6  * as published by the Free Software Foundation.
7  *
8  * This source code is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU Affero General Public License for more details.
12  *
13  * You should have received a copy of the GNU Affero General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 #pragma once
18 
19 #define GROK_SKIP_POISON
20 
21 #include "grk_includes.h"
22 
23 #ifdef WIN32
24  #include <intrin.h>
25 #elif defined(__x86_64__) || defined(__i386__)
26  #include <x86intrin.h>
27 #endif
28 
29 
30 #if defined(__GNUC__)
31 #pragma GCC poison malloc calloc realloc free
32 #endif
33 
34 namespace grk {
35 
36 class CPUArch {
37 public:
38  static bool AVX2();
39  static bool AVX();
40  static bool SSE4_1();
41  static bool SSE3();
42  static bool SSE2();
43  static bool BMI1();
44  static bool BMI2();
45 
46 };
47 
48 }
49 
Definition: CPUArch.h:36
static bool AVX2()
Definition: CPUArch.cpp:351
static bool BMI2()
Definition: CPUArch.cpp:369
static bool SSE2()
Definition: CPUArch.cpp:363
static bool SSE3()
Definition: CPUArch.cpp:360
static bool AVX()
Definition: CPUArch.cpp:354
static bool SSE4_1()
Definition: CPUArch.cpp:357
static bool BMI1()
Definition: CPUArch.cpp:366
Copyright (C) 2016-2021 Grok Image Compression Inc.
Definition: BitIO.cpp:23