Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework
v31r0 (aeb156f0)
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
•
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
* CPUFamily.cpp
3
*
4
* Created on: Sep 23, 2010
5
*/
6
13
#include <boost/python.hpp>
14
15
#define cpuid( func, ax, bx, cx, dx ) \
16
__asm__ __volatile__( "cpuid" : "=a"( ax ), "=b"( bx ), "=c"( cx ), "=d"( dx ) : "a"( func ) );
17
18
bool
is_nehalem
() {
19
int
a, b,
c
, d;
20
cpuid
( 1, a, b, c, d );
21
int
sse4_2_mask = 1 << 20;
22
return
( c & sse4_2_mask );
23
}
24
25
const
char
*
CPUFamily
() {
26
if
(
is_nehalem
() ) {
27
return
"nehalem"
;
28
}
else
{
29
return
"core"
;
30
}
31
}
32
33
BOOST_PYTHON_MODULE
( PyCPUFamily ) {
34
using namespace
boost::python
;
35
def(
"CPUFamily"
,
CPUFamily
);
36
}
gaudirun.c
c
Definition:
gaudirun.py:483
cpuid
#define cpuid(func, ax, bx, cx, dx)
Definition:
CPUFamily.cpp:15
BOOST_PYTHON_MODULE
BOOST_PYTHON_MODULE(PyCPUFamily)
Definition:
CPUFamily.cpp:33
is_nehalem
bool is_nehalem()
Definition:
CPUFamily.cpp:18
CPUFamily
const char * CPUFamily()
Definition:
CPUFamily.cpp:25
python
GaudiProfiling
src
python
CPUFamily.cpp
Generated on Mon Feb 11 2019 17:48:18 for The Gaudi Framework by
1.8.11