Gaudi Framework, version v25r2

Home   Generated: Wed Jun 4 2014
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Macros | Functions
CPUFamily.cpp File Reference

Python module to be able to check the processor family (Core/Nehalem) More...

#include <boost/python.hpp>
Include dependency graph for CPUFamily.cpp:

Go to the source code of this file.

Macros

#define cpuid(func, ax, bx, cx, dx)   __asm__ __volatile__ ("cpuid": "=a" (ax), "=b" (bx), "=c" (cx), "=d" (dx) : "a" (func));
 

Functions

bool is_nehalem ()
 
const char * CPUFamily ()
 
 BOOST_PYTHON_MODULE (PyCPUFamily)
 

Detailed Description

Python module to be able to check the processor family (Core/Nehalem)

Definition in file CPUFamily.cpp.

Macro Definition Documentation

#define cpuid (   func,
  ax,
  bx,
  cx,
  dx 
)    __asm__ __volatile__ ("cpuid": "=a" (ax), "=b" (bx), "=c" (cx), "=d" (dx) : "a" (func));

Definition at line 15 of file CPUFamily.cpp.

Function Documentation

BOOST_PYTHON_MODULE ( PyCPUFamily  )

Definition at line 32 of file CPUFamily.cpp.

{
using namespace boost::python;
def("CPUFamily", CPUFamily);
}
const char* CPUFamily ( )

Definition at line 24 of file CPUFamily.cpp.

{
if (is_nehalem()) {
return "nehalem";
} else {
return "core";
}
}
bool is_nehalem ( )

Definition at line 17 of file CPUFamily.cpp.

{
int a,b,c,d;
cpuid(1,a,b,c,d);
int sse4_2_mask = 1 << 20;
return (c & sse4_2_mask);
}

Generated at Wed Jun 4 2014 14:49:00 for Gaudi Framework, version v25r2 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004