28 std::array<int, 4> cpui;
32 __cpuid(cpui.data(), 0);
35 for (
int i = 0; i <=
nIds_; ++i)
37 __cpuidex(cpui.data(), i, 0);
38 data_.push_back(cpui);
43 memset(vendor, 0,
sizeof(vendor));
44 *
reinterpret_cast<int*
>(vendor) =
data_[0][1];
45 *
reinterpret_cast<int*
>(vendor + 4) =
data_[0][3];
46 *
reinterpret_cast<int*
>(vendor + 8) =
data_[0][2];
52 else if (
vendor_ ==
"AuthenticAMD")
73 __cpuid(cpui.data(), 0x80000000);
77 memset(brand, 0,
sizeof(brand));
79 for (
int i = 0x80000000; i <=
nExIds_; ++i)
81 __cpuidex(cpui.data(), i, 0);
95 memcpy(brand,
extdata_[2].data(),
sizeof(cpui));
96 memcpy(brand + 16,
extdata_[3].data(),
sizeof(cpui));
97 memcpy(brand + 32,
extdata_[4].data(),
sizeof(cpui));
114 std::vector<std::array<int, 4>>
data_;
Definition InstructionSet.h:11
std::bitset< 32 > f_1_ECX_
Definition InstructionSet.h:108
std::bitset< 32 > f_7_ECX_
Definition InstructionSet.h:111
int nExIds_
Definition InstructionSet.h:103
std::vector< std::array< int, 4 > > extdata_
Definition InstructionSet.h:115
int nIds_
Definition InstructionSet.h:102
bool isIntel_
Definition InstructionSet.h:106
std::bitset< 32 > f_81_EDX_
Definition InstructionSet.h:113
std::bitset< 32 > f_81_ECX_
Definition InstructionSet.h:112
std::vector< std::array< int, 4 > > data_
Definition InstructionSet.h:114
std::string brand_
Definition InstructionSet.h:105
std::bitset< 32 > f_1_EDX_
Definition InstructionSet.h:109
std::bitset< 32 > f_7_EBX_
Definition InstructionSet.h:110
std::string vendor_
Definition InstructionSet.h:104
InstructionSet_Internal()
Definition InstructionSet.h:13
bool isAMD_
Definition InstructionSet.h:107
Definition InstructionSet.h:119
bool INVPCID(void)
Definition InstructionSet.h:158
bool SSE2(void)
Definition InstructionSet.h:150
bool CLFSH(void)
Definition InstructionSet.h:146
bool AVX512PF(void)
Definition InstructionSet.h:163
bool BMI1(void)
Definition InstructionSet.h:153
bool FXSR(void)
Definition InstructionSet.h:148
bool AVX512F(void) const
Definition InstructionSet.h:160
bool MSR(void)
Definition InstructionSet.h:142
bool PREFETCHWT1(void)
Definition InstructionSet.h:168
bool LZCNT(void)
Definition InstructionSet.h:171
bool RDSEED(void)
Definition InstructionSet.h:161
bool F16C(void)
Definition InstructionSet.h:139
bool AVX2(void) const
Definition InstructionSet.h:155
bool TBM(void)
Definition InstructionSet.h:175
bool AVX(void) const
Definition InstructionSet.h:138
bool ADX(void)
Definition InstructionSet.h:162
bool SSE42(void)
Definition InstructionSet.h:132
std::string Vendor(void)
Definition InstructionSet.h:122
bool CMPXCHG16B(void)
Definition InstructionSet.h:130
bool AVX512ER(void)
Definition InstructionSet.h:164
bool FMA(void)
Definition InstructionSet.h:129
bool OSXSAVE(void)
Definition InstructionSet.h:137
bool AES(void)
Definition InstructionSet.h:135
bool CX8(void)
Definition InstructionSet.h:143
bool RDRAND(void)
Definition InstructionSet.h:140
bool MMXEXT(void)
Definition InstructionSet.h:178
bool PCLMULQDQ(void)
Definition InstructionSet.h:126
bool HLE(void)
Definition InstructionSet.h:154
bool SYSCALL(void)
Definition InstructionSet.h:177
bool FSGSBASE(void)
Definition InstructionSet.h:152
bool RTM(void)
Definition InstructionSet.h:159
bool BMI2(void)
Definition InstructionSet.h:156
std::string Brand(void)
Definition InstructionSet.h:123
bool SSSE3(void)
Definition InstructionSet.h:128
bool _3DNOW(void)
Definition InstructionSet.h:181
bool AVX512CD(void)
Definition InstructionSet.h:165
bool POPCNT(void)
Definition InstructionSet.h:134
bool MONITOR(void)
Definition InstructionSet.h:127
bool LAHF(void)
Definition InstructionSet.h:170
bool MMX(void)
Definition InstructionSet.h:147
bool SSE41(void)
Definition InstructionSet.h:131
bool SSE(void)
Definition InstructionSet.h:149
bool SHA(void)
Definition InstructionSet.h:166
bool ABM(void)
Definition InstructionSet.h:172
bool XSAVE(void)
Definition InstructionSet.h:136
bool SEP(void)
Definition InstructionSet.h:144
bool CMOV(void)
Definition InstructionSet.h:145
bool MOVBE(void)
Definition InstructionSet.h:133
bool RDTSCP(void)
Definition InstructionSet.h:179
bool SSE3(void)
Definition InstructionSet.h:125
bool XOP(void)
Definition InstructionSet.h:174
bool SSE4a(void)
Definition InstructionSet.h:173
bool _3DNOWEXT(void)
Definition InstructionSet.h:180
bool ERMS(void)
Definition InstructionSet.h:157