The Gaudi Framework
master (e199b415)
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Typedefs
a
b
c
d
e
f
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerations
a
c
d
e
f
i
l
m
n
o
p
q
r
s
t
v
Enumerator
a
b
c
d
e
f
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Properties
Related Functions
:
a
b
c
d
e
g
h
i
m
o
p
r
s
t
v
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
b
c
e
f
g
h
i
l
m
n
o
p
r
s
t
u
z
Variables
a
b
c
d
e
g
h
i
m
o
p
q
r
s
t
v
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
Enumerations
Enumerator
c
e
f
p
u
v
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
instructionsetLevel.cpp
Go to the documentation of this file.
1
/***********************************************************************************\
2
* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
3
* *
4
* This software is distributed under the terms of the Apache version 2 licence, *
5
* copied verbatim in the file "LICENSE". *
6
* *
7
* In applying this licence, CERN does not waive the privileges and immunities *
8
* granted to it by virtue of its status as an Intergovernmental Organization *
9
* or submit itself to any jurisdiction. *
10
\***********************************************************************************/
11
/*
12
* instructionsetLevel.cpp
13
*
14
* Created on: Feb 3, 2015
15
* Author: Marco Clemencic
16
*/
17
18
#include <
GaudiKernel/System.h
>
19
20
#include <iostream>
21
#include <string>
22
#include <vector>
23
24
int
main
(
int
argc
,
char
*
argv
[] ) {
25
26
// These names are those reported in flags field of /proc/cpuinfo on Linux
27
// See arch/x86/include/asm/cpufeature.h
28
const
std::vector<std::string>
sets{
// "80386",
29
"sse"
,
"sse2"
,
30
"sse3"
,
// Note: This is reported by Linux as 'pni'
31
"ssse3"
,
"sse4_1"
,
"sse4_2"
,
"avx"
,
"avx2"
,
"avx512f"
,
"avx512vl"
};
32
33
if
(
argc
== 1 ) {
34
const
std::size_t
level
=
System::instructionsetLevel
() - 1;
35
if
(
level
< sets.size() ) {
36
for
(
int
i =
level
; i >= 0; --i ) {
std::cout
<< sets[i] <<
std::endl
; }
37
}
else
{
38
std::cout
<<
"unknown instruction set level: "
<<
level
<<
std::endl
;
39
return
2;
40
}
41
}
else
if
( (
argc
== 2 ) && (
std::string
{
"all"
} ==
std::string
{
argv
[1] } ) ) {
42
for
(
auto
&
s
: sets )
std::cout
<<
s
<<
std::endl
;
43
}
else
{
44
std::cout
<<
"Error: wrong arguments\nUsage:\n\t"
<<
argv
[0] <<
" [all]"
<<
std::endl
;
45
return
1;
46
}
47
48
return
0;
49
}
std::string
STL class.
System.h
plotBacklogPyRoot.argc
argc
Definition:
plotBacklogPyRoot.py:173
main
int main(int argc, char *argv[])
Definition:
instructionsetLevel.cpp:24
gaudirun.s
string s
Definition:
gaudirun.py:346
std::vector< std::string >
System::instructionsetLevel
GAUDI_API int instructionsetLevel()
Instruction Set "Level".
Definition:
System.cpp:343
std::cout
gaudirun.level
level
Definition:
gaudirun.py:364
std::endl
T endl(T... args)
std::size_t
gaudirun.argv
list argv
Definition:
gaudirun.py:327
GaudiKernel
src
Util
instructionsetLevel.cpp
Generated on Fri May 16 2025 09:51:07 for The Gaudi Framework by
1.8.18