From 1f67bef971bba64ca71fa04ccff19240e33f95d2 Mon Sep 17 00:00:00 2001 From: antonydellavecchia Date: Fri, 6 Dec 2024 11:07:55 +0100 Subject: [PATCH] adds suggestion from PR #4260 --- .../AlgebraicShifting/src/PartialShiftGraph.jl | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/experimental/AlgebraicShifting/src/PartialShiftGraph.jl b/experimental/AlgebraicShifting/src/PartialShiftGraph.jl index 6041d6670d61..ecb13d5108e1 100644 --- a/experimental/AlgebraicShifting/src/PartialShiftGraph.jl +++ b/experimental/AlgebraicShifting/src/PartialShiftGraph.jl @@ -217,18 +217,11 @@ function partial_shift_graph(F::Field, complexes::Vector{T}, Oscar.put_params(channels, codomain(phi)) map_function = pmap end - try - if show_progress - edge_labels = reduce((d1, d2) -> mergewith!(vcat, d1, d2), - @showprogress map_function( + try + edge_labels = reduce((d1, d2) -> mergewith!(vcat, d1, d2), + @showprogress enabled=show_progress map_function( Ks -> multi_edges(F, phi.(W), Ks, complex_labels), Iterators.partition(enumerate(complexes), task_size))) - else - edge_labels = reduce((d1, d2) -> mergewith!(vcat, d1, d2), - map_function( - Ks -> multi_edges(F, phi.(W), Ks, complex_labels), - Iterators.partition(enumerate(complexes), task_size))) - end graph = graph_from_edges(Directed, [[i,j] for (i,j) in keys(edge_labels)]) return (graph, Dict(k => inv(phi).(v) for (k, v) in edge_labels),