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

Method PinnedThreadPool

csrc/adam/cpu_adam_impl.cpp:555–562  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

553class PinnedThreadPool {
554public:
555 explicit PinnedThreadPool(const std::vector<int>& affinity)
556 {
557 n_ = std::max<size_t>(1, affinity.size());
558 for (size_t i = 0; i < n_; ++i) {
559 int core = affinity.empty() ? -1 : affinity[i];
560 threads_.emplace_back([this, i, core] { worker(i, core); });
561 }
562 }
563
564 ~PinnedThreadPool()
565 {

Callers

nothing calls this directly

Calls 2

workerFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected