MCPcopy Create free account
hub / github.com/Kitware/CMake / GetProcessorsUsed

Method GetProcessorsUsed

Source/CTest/cmCTestMultiProcessHandler.cxx:542–557  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

540}
541
542inline size_t cmCTestMultiProcessHandler::GetProcessorsUsed(int test)
543{
544 size_t processors = this->Properties[test]->Processors;
545 size_t const parallelLevel = this->GetParallelLevel();
546 // If processors setting is set higher than the -j
547 // setting, we default to using all of the process slots.
548 if (processors > parallelLevel) {
549 processors = parallelLevel;
550 }
551 // Cap tests that want affinity to the maximum affinity available.
552 if (this->HaveAffinity && processors > this->HaveAffinity &&
553 this->Properties[test]->WantAffinity) {
554 processors = this->HaveAffinity;
555 }
556 return processors;
557}
558
559std::string cmCTestMultiProcessHandler::GetName(int test)
560{

Callers 3

LockResourcesMethod · 0.95
UnlockResourcesMethod · 0.95
StartNextTestsMethod · 0.95

Calls 1

GetParallelLevelMethod · 0.95

Tested by

no test coverage detected