mirror of
https://github.com/verilator/verilator.git
synced 2026-09-07 10:01:11 +02:00
Signed-off-by: Yangyu Chen <[email protected]>
This commit is contained in:
@@ -147,6 +147,12 @@ VlThreadPool::~VlThreadPool() {
|
||||
|
||||
std::string VlThreadPool::numaAssign() {
|
||||
#if defined(__linux) || defined(CPU_ZERO) || defined(VL_CPPCHECK) // Linux-like pthreads
|
||||
std::string numa_strategy = VlOs::getenvStr("VERILATOR_NUMA_STRATEGY", "default");
|
||||
if (numa_strategy == "none") {
|
||||
return "no NUMA assignment requested";
|
||||
} else if (numa_strategy != "default" && numa_strategy != "") {
|
||||
return "%Warning: unknown VERILATOR_NUMA_STRATEGY value '" + numa_strategy + "'";
|
||||
}
|
||||
// Get number of processor available to the current process
|
||||
const unsigned num_proc = VlOs::getProcessAvailableParallelism();
|
||||
if (!num_proc) return "Can't determine number of available threads";
|
||||
|
||||
Reference in New Issue
Block a user