MCPcopy Create free account
hub / github.com/bitsandbytes-foundation/bitsandbytes / get_max_threads

Function get_max_threads

csrc/cpu_ops.h:62–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62inline int get_max_threads() {
63#if defined(_OPENMP)
64 return omp_get_max_threads();
65#else
66 unsigned hc = std::thread::hardware_concurrency();
67 return hc == 0 ? 1 : int(hc);
68#endif
69}
70
71inline int adjust_num_threads(int m) {
72 int actual_nth = get_max_threads();

Callers 1

adjust_num_threadsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected