MCPcopy Create free account
hub / github.com/antirez/llama.cpp-deepseek-v4-flash / set_process_priority

Function set_process_priority

common/common.cpp:212–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210#if defined(_WIN32)
211
212bool set_process_priority(enum ggml_sched_priority prio) {
213 if (prio == GGML_SCHED_PRIO_NORMAL) {
214 return true;
215 }
216
217 DWORD p = NORMAL_PRIORITY_CLASS;
218 switch (prio) {
219 case GGML_SCHED_PRIO_LOW: p = BELOW_NORMAL_PRIORITY_CLASS; break;
220 case GGML_SCHED_PRIO_NORMAL: p = NORMAL_PRIORITY_CLASS; break;
221 case GGML_SCHED_PRIO_MEDIUM: p = ABOVE_NORMAL_PRIORITY_CLASS; break;
222 case GGML_SCHED_PRIO_HIGH: p = HIGH_PRIORITY_CLASS; break;
223 case GGML_SCHED_PRIO_REALTIME: p = REALTIME_PRIORITY_CLASS; break;
224 }
225
226 if (!SetPriorityClass(GetCurrentProcess(), p)) {
227 LOG_WRN("failed to set process priority class %d : (%d)\n", prio, (int) GetLastError());
228 return false;
229 }
230
231 return true;
232}
233
234#else // MacOS and POSIX
235#include <sys/types.h>

Callers 2

mainFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected