MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / ParallelFor

Method ParallelFor

oneflow/core/thread/thread_runtime.h:51–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49class RuntimeBase {
50 public:
51 void ParallelFor(int64_t begin, int64_t end, const CallableT& func, size_t num_threads,
52 size_t grain_size) {
53 if (begin >= end) { return; }
54 if (num_threads == 1) { return SeqFor(begin, end, func); }
55 ParallelForImpl(begin, end, func, num_threads, grain_size);
56 }
57
58 private:
59 virtual void ParallelForImpl(int64_t begin, int64_t end, const CallableT& func,

Callers

nothing calls this directly

Calls 1

SeqForFunction · 0.85

Tested by

no test coverage detected