File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -22286,7 +22286,8 @@ static bool ggml_thread_apply_priority(int32_t prio) {
2228622286 return true;
2228722287}
2228822288
22289- #else // posix?
22289+ #elif defined(__gnu_linux__)
22290+ // TODO: this may not work on BSD, to be verified
2229022291
2229122292static bool ggml_thread_apply_affinity(const bool * mask) {
2229222293 cpu_set_t cpuset;
@@ -22341,6 +22342,18 @@ static bool ggml_thread_apply_priority(int32_t prio) {
2234122342 return true;
2234222343}
2234322344
22345+ #else // unsupported platforms
22346+
22347+ static bool ggml_thread_apply_affinity(const bool * mask) {
22348+ UNUSED(mask);
22349+ return true;
22350+ }
22351+
22352+ static bool ggml_thread_apply_priority(int32_t prio) {
22353+ UNUSED(prio);
22354+ return true;
22355+ }
22356+
2234422357#endif
2234522358
2234622359static bool ggml_thread_cpumask_is_valid(const bool * mask) {
You can’t perform that action at this time.
0 commit comments