mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-24 10:24:35 +00:00
ggml : fix missing cpu_set_t
on emscripten (#9336)
* ggml : fix missing cpu_set_t on emscripten * better version * bring back android part
This commit is contained in:
parent
6c89eb0b47
commit
947538acb8
@ -19556,7 +19556,8 @@ static bool ggml_thread_apply_priority(int32_t prio) {
|
||||
return true;
|
||||
}
|
||||
|
||||
#else // posix?
|
||||
#elif defined(__gnu_linux__)
|
||||
// TODO: this may not work on BSD, to be verified
|
||||
|
||||
static bool ggml_thread_apply_affinity(const bool * mask) {
|
||||
cpu_set_t cpuset;
|
||||
@ -19611,6 +19612,18 @@ static bool ggml_thread_apply_priority(int32_t prio) {
|
||||
return true;
|
||||
}
|
||||
|
||||
#else // unsupported platforms
|
||||
|
||||
static bool ggml_thread_apply_affinity(const bool * mask) {
|
||||
UNUSED(mask);
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool ggml_thread_apply_priority(int32_t prio) {
|
||||
UNUSED(prio);
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static bool ggml_thread_cpumask_is_valid(const bool * mask) {
|
||||
|
Loading…
Reference in New Issue
Block a user