Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework
master (f31105fd)
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
CPUFamily.cpp
Go to the documentation of this file.
1
/***********************************************************************************\
2
* (c) Copyright 1998-2020 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
* CPUFamily.cpp
13
*
14
* Created on: Sep 23, 2010
15
*/
16
23
#include <boost/python.hpp>
24
25
#define cpuid( func, ax, bx, cx, dx ) \
26
__asm__ __volatile__( "cpuid" : "=a"( ax ), "=b"( bx ), "=c"( cx ), "=d"( dx ) : "a"( func ) );
27
28
bool
is_nehalem
() {
29
#ifdef __x86_64__
30
int
a, b,
c
, d;
31
cpuid
( 1, a, b,
c
, d );
32
int
sse4_2_mask = 1 << 20;
33
return
(
c
& sse4_2_mask );
34
#else
35
return
false
;
36
#endif // __x86_64__
37
}
38
39
const
char
*
CPUFamily
() {
40
if
(
is_nehalem
() ) {
41
return
"nehalem"
;
42
}
else
{
43
return
"core"
;
44
}
45
}
46
47
BOOST_PYTHON_MODULE
( PyCPUFamily ) {
48
using namespace
boost::python;
49
def(
"CPUFamily"
,
CPUFamily
);
50
}
CPUFamily
const char * CPUFamily()
Definition:
CPUFamily.cpp:39
gaudirun.c
c
Definition:
gaudirun.py:525
BOOST_PYTHON_MODULE
BOOST_PYTHON_MODULE(PyCPUFamily)
Definition:
CPUFamily.cpp:47
is_nehalem
bool is_nehalem()
Definition:
CPUFamily.cpp:28
cpuid
#define cpuid(func, ax, bx, cx, dx)
Definition:
CPUFamily.cpp:25
GaudiProfiling
src
python
CPUFamily.cpp
Generated on Mon Apr 7 2025 16:26:25 for The Gaudi Framework by
1.8.18