MCPcopy Create free account
hub / github.com/davisking/dlib / cpuid

Function cpuid

dlib/simd/simd_check.h:119–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117 #include <intrin.h>
118
119 inline std::array<unsigned int,4> cpuid(int function_id)
120 {
121 std::array<unsigned int,4> info;
122 // Load EAX, EBX, ECX, EDX into info
123 __cpuid((int*)info.data(), function_id);
124 return info;
125 }
126
127#elif (defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__i686__) || defined(__amd64__) || defined(__x86_64__))
128 #include <cpuid.h>

Callers 7

cpu_has_avx_instructionsFunction · 0.85

Calls 1

dataMethod · 0.45

Tested by

no test coverage detected