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

Method PinnedThreadPool

csrc/adam/cpu_adam_impl.cpp:396–403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

394class PinnedThreadPool {
395public:
396 explicit PinnedThreadPool(const std::vector<int>& affinity)
397 {
398 n_ = std::max<size_t>(1, affinity.size());
399 for (size_t i = 0; i < n_; ++i) {
400 int core = affinity.empty() ? -1 : affinity[i];
401 threads_.emplace_back([this, i, core] { worker(i, core); });
402 }
403 }
404
405 ~PinnedThreadPool()
406 {

Callers

nothing calls this directly

Calls 2

workerFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected