1 /* This file is part of the Vc library. {{{
2 Copyright © 2015 Matthias Kretz <kretz@kde.org>
3
4 Redistribution and use in source and binary forms, with or without
5 modification, are permitted provided that the following conditions are met:
6 * Redistributions of source code must retain the above copyright
7 notice, this list of conditions and the following disclaimer.
8 * Redistributions in binary form must reproduce the above copyright
9 notice, this list of conditions and the following disclaimer in the
10 documentation and/or other materials provided with the distribution.
11 * Neither the names of contributing organizations nor the
12 names of its contributors may be used to endorse or promote products
13 derived from this software without specific prior written permission.
14
15 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
19 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25
26 }}}*/
27
28 #include <Vc/cpuid.h>
29 #include <iostream>
30
main()31 int Vc_CDECL main()
32 {
33 using Vc::CpuId;
34 std::cout << " cacheLineSize: " << CpuId::cacheLineSize() << '\n';
35 std::cout << " processorType: " << CpuId::processorType() << '\n';
36 std::cout << " processorFamily: " << CpuId::processorFamily() << '\n';
37 std::cout << " processorModel: " << CpuId::processorModel() << '\n';
38 std::cout << " logicalProcessors: " << CpuId::logicalProcessors() << '\n';
39 std::cout << " isAmd: " << CpuId::isAmd () << '\n';
40 std::cout << " isIntel: " << CpuId::isIntel () << '\n';
41 std::cout << " hasSse3: " << CpuId::hasSse3 () << '\n';
42 std::cout << " hasPclmulqdq: " << CpuId::hasPclmulqdq() << '\n';
43 std::cout << " hasMonitor: " << CpuId::hasMonitor() << '\n';
44 std::cout << " hasVmx: " << CpuId::hasVmx () << '\n';
45 std::cout << " hasSmx: " << CpuId::hasSmx () << '\n';
46 std::cout << " hasEist: " << CpuId::hasEist () << '\n';
47 std::cout << " hasTm2: " << CpuId::hasTm2 () << '\n';
48 std::cout << " hasSsse3: " << CpuId::hasSsse3() << '\n';
49 std::cout << " hasFma: " << CpuId::hasFma () << '\n';
50 std::cout << " hasCmpXchg16b: " << CpuId::hasCmpXchg16b() << '\n';
51 std::cout << " hasPdcm: " << CpuId::hasPdcm () << '\n';
52 std::cout << " hasDca: " << CpuId::hasDca() << '\n';
53 std::cout << " hasSse41: " << CpuId::hasSse41() << '\n';
54 std::cout << " hasSse42: " << CpuId::hasSse42() << '\n';
55 std::cout << " hasMovbe: " << CpuId::hasMovbe() << '\n';
56 std::cout << " hasPopcnt: " << CpuId::hasPopcnt()<< '\n';
57 std::cout << " hasAes: " << CpuId::hasAes () << '\n';
58 std::cout << " hasOsxsave: " << CpuId::hasOsxsave() << '\n';
59 std::cout << " hasAvx: " << CpuId::hasAvx () << '\n';
60 std::cout << " hasBmi1: " << CpuId::hasBmi1 () << '\n';
61 std::cout << " hasHle: " << CpuId::hasHle () << '\n';
62 std::cout << " hasAvx2: " << CpuId::hasAvx2 () << '\n';
63 std::cout << " hasBmi2: " << CpuId::hasBmi2 () << '\n';
64 std::cout << " hasRtm: " << CpuId::hasRtm () << '\n';
65 std::cout << " hasAvx512f: " << CpuId::hasAvx512f () << '\n';
66 std::cout << " hasAvx512dq: " << CpuId::hasAvx512dq () << '\n';
67 std::cout << " hasAvx512ifma: " << CpuId::hasAvx512ifma() << '\n';
68 std::cout << " hasAvx512pf: " << CpuId::hasAvx512pf () << '\n';
69 std::cout << " hasAvx512er: " << CpuId::hasAvx512er () << '\n';
70 std::cout << " hasAvx512cd: " << CpuId::hasAvx512cd () << '\n';
71 std::cout << " hasAvx512bw: " << CpuId::hasAvx512bw () << '\n';
72 std::cout << " hasAvx512vl: " << CpuId::hasAvx512vl () << '\n';
73 std::cout << " hasAvx512vbmi: " << CpuId::hasAvx512vbmi() << '\n';
74 std::cout << " hasF16c: " << CpuId::hasF16c () << '\n';
75 std::cout << " hasRdrand: " << CpuId::hasRdrand()<< '\n';
76 std::cout << " hasFpu: " << CpuId::hasFpu () << '\n';
77 std::cout << " hasVme: " << CpuId::hasVme () << '\n';
78 std::cout << " hasDe: " << CpuId::hasDe () << '\n';
79 std::cout << " hasPse: " << CpuId::hasPse () << '\n';
80 std::cout << " hasTsc: " << CpuId::hasTsc () << '\n';
81 std::cout << " hasMsr: " << CpuId::hasMsr () << '\n';
82 std::cout << " hasPae: " << CpuId::hasPae () << '\n';
83 std::cout << " hasCx8: " << CpuId::hasCx8 () << '\n';
84 std::cout << " hasMtrr: " << CpuId::hasMtrr () << '\n';
85 std::cout << " hasCmov: " << CpuId::hasCmov () << '\n';
86 std::cout << " hasClfsh: " << CpuId::hasClfsh() << '\n';
87 std::cout << " hasAcpi: " << CpuId::hasAcpi () << '\n';
88 std::cout << " hasMmx: " << CpuId::hasMmx () << '\n';
89 std::cout << " hasSse: " << CpuId::hasSse () << '\n';
90 std::cout << " hasSse2: " << CpuId::hasSse2 () << '\n';
91 std::cout << " hasHtt: " << CpuId::hasHtt () << '\n';
92 std::cout << " hasSse4a: " << CpuId::hasSse4a() << '\n';
93 std::cout << " hasMisAlignSse: " << CpuId::hasMisAlignSse() << '\n';
94 std::cout << " hasAmdPrefetch: " << CpuId::hasAmdPrefetch() << '\n';
95 std::cout << " hasXop: " << CpuId::hasXop () << '\n';
96 std::cout << " hasFma4: " << CpuId::hasFma4 () << '\n';
97 std::cout << " hasRdtscp: " << CpuId::hasRdtscp() << '\n';
98 std::cout << " has3DNow: " << CpuId::has3DNow() << '\n';
99 std::cout << " has3DNowExt: " << CpuId::has3DNowExt() << '\n';
100 std::cout << " L1Instruction: " << CpuId::L1Instruction() << '\n';
101 std::cout << " L1Data: " << CpuId::L1Data() << '\n';
102 std::cout << " L2Data: " << CpuId::L2Data() << '\n';
103 std::cout << " L3Data: " << CpuId::L3Data() << '\n';
104 std::cout << "L1InstructionLineSize: " << CpuId::L1InstructionLineSize() << '\n';
105 std::cout << " L1DataLineSize: " << CpuId::L1DataLineSize() << '\n';
106 std::cout << " L2DataLineSize: " << CpuId::L2DataLineSize() << '\n';
107 std::cout << " L3DataLineSize: " << CpuId::L3DataLineSize() << '\n';
108 std::cout << " L1Associativity: " << CpuId::L1Associativity() << '\n';
109 std::cout << " L2Associativity: " << CpuId::L2Associativity() << '\n';
110 std::cout << " L3Associativity: " << CpuId::L3Associativity() << '\n';
111 std::cout << " prefetch: " << CpuId::prefetch() << '\n';
112 return 0;
113 }
114
115 // vim: foldmethod=marker
116