MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / cpuid

Function cpuid

smallthinker/common/common.cpp:125–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123#include <pthread.h>
124
125static void cpuid(unsigned leaf, unsigned subleaf,
126 unsigned *eax, unsigned *ebx, unsigned *ecx, unsigned *edx) {
127 __asm__("movq\t%%rbx,%%rsi\n\t"
128 "cpuid\n\t"
129 "xchgq\t%%rbx,%%rsi"
130 : "=a"(*eax), "=S"(*ebx), "=c"(*ecx), "=d"(*edx)
131 : "0"(leaf), "2"(subleaf));
132}
133
134static int pin_cpu(int cpu) {
135 cpu_set_t mask;

Callers 3

is_hybrid_cpuFunction · 0.85
cpuid_x86Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected