|
Gaudi Framework, version v22r0 |
| Home | Generated: 9 Feb 2011 |
Python module to be able to check the processor family (Core/Nehalem). More...
#include <boost/python.hpp>
Go to the source code of this file.
Defines | |
| #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) | |
Python module to be able to check the processor family (Core/Nehalem).
Definition in file CPUFamily.cpp.
| #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.
| BOOST_PYTHON_MODULE | ( | PyCPUFamily | ) |
Definition at line 32 of file CPUFamily.cpp.
00033 { 00034 using namespace boost::python; 00035 def("CPUFamily", CPUFamily); 00036 }
| const char* CPUFamily | ( | ) |
Definition at line 24 of file CPUFamily.cpp.
00024 { 00025 if (is_nehalem()) { 00026 return "nehalem"; 00027 } else { 00028 return "core"; 00029 } 00030 }
| bool is_nehalem | ( | ) |
Definition at line 17 of file CPUFamily.cpp.