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

Function pin_cpu

smallthinker/common/common.cpp:134–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132}
133
134static int pin_cpu(int cpu) {
135 cpu_set_t mask;
136 CPU_ZERO(&mask);
137 CPU_SET(cpu, &mask);
138 return pthread_setaffinity_np(pthread_self(), sizeof(mask), &mask);
139}
140
141static bool is_hybrid_cpu(void) {
142 unsigned eax, ebx, ecx, edx;

Callers 1

cpu_count_math_cpusFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected