Grok  7.6.2
CPUArch.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016-2020 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 
grk::CPUArch::BMI2
static bool BMI2()
Definition: CPUArch.cpp:369
grk::CPUArch::SSE4_1
static bool SSE4_1()
Definition: CPUArch.cpp:357
CPUArch.h
grk::CPUArch::BMI1
static bool BMI1()
Definition: CPUArch.cpp:366
grk::CPUArch::SSE2
static bool SSE2()
Definition: CPUArch.cpp:363
cpu_level
static int cpu_level
Definition: CPUArch.cpp:335
cpu_level_initialized
static bool cpu_level_initialized
Definition: CPUArch.cpp:336
grk::CPUArch::AVX2
static bool AVX2()
Definition: CPUArch.cpp:351
grk
Copyright (C) 2016-2020 Grok Image Compression Inc.
Definition: BitIO.cpp:23
grk::CPUArch::SSE3
static bool SSE3()
Definition: CPUArch.cpp:360
grk_includes.h
cpu_ext_level
int cpu_ext_level()
Definition: CPUArch.cpp:342
grk::CPUArch
Definition: CPUArch.h:36
grk::CPUArch::AVX
static bool AVX()
Definition: CPUArch.cpp:354