Skip to content

Commit ada0c05

Browse files
committed
Default to parallel=:threads everywhere
1 parent a52df10 commit ada0c05

File tree

7 files changed

+11
-19
lines changed

7 files changed

+11
-19
lines changed

src/Parallel/centrality/betweenness.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ function betweenness_centrality(
44
distmx::AbstractMatrix=weights(g);
55
normalize=true,
66
endpoints=false,
7-
parallel=:distributed,
7+
parallel=:threads,
88
)
99
return if parallel == :distributed
1010
distr_betweenness_centrality(
@@ -23,7 +23,7 @@ function betweenness_centrality(
2323
distmx::AbstractMatrix=weights(g);
2424
normalize=true,
2525
endpoints=false,
26-
parallel=:distributed,
26+
parallel=:threads,
2727
rng::Union{Nothing,AbstractRNG}=nothing,
2828
seed::Union{Nothing,Integer}=nothing,
2929
)

src/Parallel/centrality/closeness.jl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
function closeness_centrality(
2-
g::AbstractGraph,
3-
distmx::AbstractMatrix=weights(g);
4-
normalize=true,
5-
parallel=:distributed,
2+
g::AbstractGraph, distmx::AbstractMatrix=weights(g); normalize=true, parallel=:threads
63
)
74
return if parallel == :distributed
85
distr_closeness_centrality(g, distmx; normalize=normalize)

src/Parallel/centrality/radiality.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function radiality_centrality(g::AbstractGraph; parallel=:distributed)
1+
function radiality_centrality(g::AbstractGraph; parallel=:threads)
22
return if parallel == :distributed
33
distr_radiality_centrality(g)
44
else

src/Parallel/centrality/stress.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function stress_centrality(g::AbstractGraph, vs=vertices(g); parallel=:distributed)
1+
function stress_centrality(g::AbstractGraph, vs=vertices(g); parallel=:threads)
22
return if parallel == :distributed
33
distr_stress_centrality(g, vs)
44
else
@@ -9,7 +9,7 @@ end
99
function stress_centrality(
1010
g::AbstractGraph,
1111
k::Integer;
12-
parallel=:distributed,
12+
parallel=:threads,
1313
rng::Union{Nothing,AbstractRNG}=nothing,
1414
seed::Union{Nothing,Integer}=nothing,
1515
)

src/Parallel/distance.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ function eccentricity(
44
g::AbstractGraph,
55
vs=vertices(g),
66
distmx::AbstractMatrix{T}=weights(g);
7-
parallel::Symbol=:distributed,
7+
parallel::Symbol=:threads,
88
) where {T<:Number}
99
return if parallel === :threads
1010
threaded_eccentricity(g, vs, distmx)
@@ -38,9 +38,7 @@ function threaded_eccentricity(
3838
return eccs
3939
end
4040

41-
function eccentricity(
42-
g::AbstractGraph, distmx::AbstractMatrix; parallel::Symbol=:distributed
43-
)
41+
function eccentricity(g::AbstractGraph, distmx::AbstractMatrix; parallel::Symbol=:threads)
4442
return eccentricity(g, vertices(g), distmx; parallel)
4543
end
4644

src/Parallel/shortestpaths/dijkstra.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function dijkstra_shortest_paths(
2121
g::AbstractGraph{U},
2222
sources=vertices(g),
2323
distmx::AbstractMatrix{T}=weights(g);
24-
parallel::Symbol=:distributed,
24+
parallel::Symbol=:threads,
2525
) where {T<:Number} where {U}
2626
return if parallel === :threads
2727
threaded_dijkstra_shortest_paths(g, sources, distmx)

src/Parallel/traversals/greedy_color.jl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
function random_greedy_color(
2-
g::AbstractGraph{T}, reps::Integer; parallel::Symbol=:distributed
2+
g::AbstractGraph{T}, reps::Integer; parallel::Symbol=:threads
33
) where {T<:Integer}
44
return if parallel === :threads
55
threaded_random_greedy_color(g, reps)
@@ -32,10 +32,7 @@ function distr_random_greedy_color(args...; kwargs...)
3232
end
3333

3434
function greedy_color(
35-
g::AbstractGraph{U};
36-
sort_degree::Bool=false,
37-
reps::Integer=1,
38-
parallel::Symbol=:distributed,
35+
g::AbstractGraph{U}; sort_degree::Bool=false, reps::Integer=1, parallel::Symbol=:threads
3936
) where {U<:Integer}
4037
return if sort_degree
4138
Graphs.degree_greedy_color(g)

0 commit comments

Comments
 (0)