MCPcopy Create free account
hub / github.com/davisking/dlib / default_num_threads

Function default_num_threads

dlib/threads/async.cpp:21–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19 namespace impl
20 {
21 unsigned long default_num_threads()
22 {
23 try
24 {
25 char* nt = getenv("DLIB_NUM_THREADS");
26 if (nt)
27 return string_cast<unsigned long>(nt);
28 } catch(string_cast_error&) {}
29 return std::thread::hardware_concurrency();
30 }
31 }
32
33// ----------------------------------------------------------------------------------------

Callers 1

async.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected