Skip to content

Commit 64d5a25

Browse files
committed
fixup! Add processor helpers
1 parent f397f85 commit 64d5a25

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Diff for: src/utils/processors.jl

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Processor utilities
22

3+
"""
4+
all_processors(ctx::Context=Sch.eager_context()) -> Set{Processor}
5+
6+
Returns the set of all processors available to the scheduler, across all
7+
Distributed workers.
8+
"""
39
function all_processors(ctx::Context=Sch.eager_context())
410
all_procs = Set{Processor}()
511
for gproc in procs(ctx)

Diff for: src/utils/scopes.jl

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Scope-Processor helpers
22

3+
"""
4+
compatible_processors(scope::AbstractScope, ctx::Context=Sch.eager_context()) -> Set{Processor}
5+
6+
Returns the set of all processors (across all Distributed workers) that are
7+
compatible with the given scope.
8+
"""
39
function compatible_processors(scope::AbstractScope, ctx::Context=Sch.eager_context())
410
compat_procs = Set{Processor}()
511
for gproc in procs(ctx)

0 commit comments

Comments
 (0)