MCPcopy Create free account
hub / github.com/Niko1221/Strata / cpuid

Function cpuid

engine/src/quant/isa.cpp:28–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26
27#ifdef STRATA_QUANT_X86
28void cpuid(unsigned leaf, unsigned sub, unsigned r[4]) {
29#if defined(_MSC_VER)
30 int a[4];
31 __cpuidex(a, (int) leaf, (int) sub);
32 for (int i = 0; i < 4; ++i) r[i] = (unsigned) a[i];
33#else
34 __cpuid_count(leaf, sub, r[0], r[1], r[2], r[3]);
35#endif
36}
37unsigned long long xgetbv0() {
38#if defined(_MSC_VER)
39 return _xgetbv(0);

Callers 5

probeFunction · 0.70
cpu_avx512_okFunction · 0.50
cpu_avx512bw_okFunction · 0.50
isa_probeFunction · 0.50
cpu_avx2_okFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected