MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / PinnedThreadPool

Method PinnedThreadPool

csrc/adam/cpu_adam_impl.cpp:532–539  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

530class PinnedThreadPool {
531public:
532 explicit PinnedThreadPool(const std::vector<int>& affinity)
533 {
534 n_ = std::max<size_t>(1, affinity.size());
535 for (size_t i = 0; i < n_; ++i) {
536 int core = affinity.empty() ? -1 : affinity[i];
537 threads_.emplace_back([this, i, core] { worker(i, core); });
538 }
539 }
540
541 ~PinnedThreadPool()
542 {

Callers

nothing calls this directly

Calls 2

workerFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected