HPCToolkit
cpuid.h
Go to the documentation of this file.
1
// -*-Mode: C++;-*- // technically C99
2
3
// * BeginRiceCopyright *****************************************************
4
//
5
// $HeadURL$
6
// $Id$
7
//
8
// --------------------------------------------------------------------------
9
// Part of HPCToolkit (hpctoolkit.org)
10
//
11
// Information about sources of support for research and development of
12
// HPCToolkit is at 'hpctoolkit.org' and in 'README.Acknowledgments'.
13
// --------------------------------------------------------------------------
14
//
15
// Copyright ((c)) 2002-2018, Rice University
16
// All rights reserved.
17
//
18
// Redistribution and use in source and binary forms, with or without
19
// modification, are permitted provided that the following conditions are
20
// met:
21
//
22
// * Redistributions of source code must retain the above copyright
23
// notice, this list of conditions and the following disclaimer.
24
//
25
// * Redistributions in binary form must reproduce the above copyright
26
// notice, this list of conditions and the following disclaimer in the
27
// documentation and/or other materials provided with the distribution.
28
//
29
// * Neither the name of Rice University (RICE) nor the names of its
30
// contributors may be used to endorse or promote products derived from
31
// this software without specific prior written permission.
32
//
33
// This software is provided by RICE and contributors "as is" and any
34
// express or implied warranties, including, but not limited to, the
35
// implied warranties of merchantability and fitness for a particular
36
// purpose are disclaimed. In no event shall RICE or contributors be
37
// liable for any direct, indirect, incidental, special, exemplary, or
38
// consequential damages (including, but not limited to, procurement of
39
// substitute goods or services; loss of use, data, or profits; or
40
// business interruption) however caused and on any theory of liability,
41
// whether in contract, strict liability, or tort (including negligence
42
// or otherwise) arising in any way out of the use of this software, even
43
// if advised of the possibility of such damage.
44
//
45
// ******************************************************* EndRiceCopyright *
46
47
48
#ifndef SRC_TOOL_HPCRUN_UTILITIES_CPUID_H_
49
#define SRC_TOOL_HPCRUN_UTILITIES_CPUID_H_
50
51
52
#define VENDOR_INTEL "GenuineIntel"
53
#define VENDOR_AMD "AuthenticAMD"
54
55
struct
cpuid_type_s
{
56
char
vendor
[13];
57
int
family
;
58
int
model
;
59
int
step
;
60
};
61
62
typedef
enum
{
63
CPU_UNSUP
= 0,
64
65
INTEL_WSM_EX
,
// westmere
66
INTEL_WSM_EP
,
// westmere server
67
68
INTEL_SNB
,
// sandy bridge
69
INTEL_SNB_EP
,
// sandy bridge server
70
INTEL_NHM_EX
,
// nehalem
71
INTEL_NHM_EP
,
// nehalem server
72
73
INTEL_IVB_EX
,
// ivy bridge
74
75
INTEL_HSX
,
// haswell
76
INTEL_BDX
,
// broadwell
77
INTEL_SKX
,
// sky lake
78
INTEL_ICL
,
79
INTEL_KNL
,
// knight landing
80
81
AMD_MGN_CRS
// amd magny cours
82
}
cpu_type_t
;
83
84
85
cpu_type_t
get_cpuid
(
void
);
86
87
88
#endif
/* SRC_TOOL_HPCRUN_UTILITIES_CPUID_H_ */
INTEL_SNB
Definition:
cpuid.h:68
cpuid_type_s::vendor
char vendor[13]
Definition:
cpuid.h:56
AMD_MGN_CRS
Definition:
cpuid.h:81
cpuid_type_s::model
int model
Definition:
cpuid.h:58
cpuid_type_s
Definition:
cpuid.h:55
CPU_UNSUP
Definition:
cpuid.h:63
INTEL_KNL
Definition:
cpuid.h:79
INTEL_WSM_EX
Definition:
cpuid.h:65
INTEL_IVB_EX
Definition:
cpuid.h:73
INTEL_NHM_EP
Definition:
cpuid.h:71
get_cpuid
cpu_type_t get_cpuid(void)
Definition:
cpuid.c:52
INTEL_NHM_EX
Definition:
cpuid.h:70
INTEL_SNB_EP
Definition:
cpuid.h:69
INTEL_HSX
Definition:
cpuid.h:75
cpuid_type_s::family
int family
Definition:
cpuid.h:57
cpu_type_t
cpu_type_t
Definition:
cpuid.h:62
cpuid_type_s::step
int step
Definition:
cpuid.h:59
INTEL_SKX
Definition:
cpuid.h:77
INTEL_BDX
Definition:
cpuid.h:76
INTEL_WSM_EP
Definition:
cpuid.h:66
INTEL_ICL
Definition:
cpuid.h:78
src
tool
hpcrun
utilities
arch
cpuid.h
Generated by
1.8.13