MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / cpuid

Function cpuid

subprojects/llama.cpp/common/common.cpp:140–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138#include <pthread.h>
139
140static void cpuid(unsigned leaf, unsigned subleaf,
141 unsigned *eax, unsigned *ebx, unsigned *ecx, unsigned *edx) {
142 __asm__("movq\t%%rbx,%%rsi\n\t"
143 "cpuid\n\t"
144 "xchgq\t%%rbx,%%rsi"
145 : "=a"(*eax), "=S"(*ebx), "=c"(*ecx), "=d"(*edx)
146 : "0"(leaf), "2"(subleaf));
147}
148
149static int pin_cpu(int cpu) {
150 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