From d7bc94b64cffc4eee2c74f869dc6b85fb076ae10 Mon Sep 17 00:00:00 2001 From: kalmarek Date: Mon, 9 Oct 2017 18:08:22 +0200 Subject: [PATCH] @parallel compute_SOS --- src/CheckSolution.jl | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/CheckSolution.jl b/src/CheckSolution.jl index 7bcb74a..0fb7610 100644 --- a/src/CheckSolution.jl +++ b/src/CheckSolution.jl @@ -36,17 +36,17 @@ function compute_SOS(sqrt_matrix, elt::GroupRingElem) l = length(elt.coeffs) pm = parent(elt).pm - result = zeros(eltype(sqrt_matrix), l) - for i in 1:n - result .+= groupring_square(view(sqrt_matrix,:,i), l, pm) - end - - # @everywhere groupring_square = PropertyT.groupring_square - # - # result = @parallel (+) for i in 1:n - # groupring_square(view(sqrt_matrix,:,i), length(elt.coeffs), parent(elt).pm) + # result = zeros(eltype(sqrt_matrix), l) + # for i in 1:n + # result .+= groupring_square(view(sqrt_matrix,:,i), l, pm) # end + @everywhere groupring_square = PropertyT.groupring_square + + result = @parallel (+) for i in 1:n + groupring_square(view(sqrt_matrix,:,i), length(elt.coeffs), parent(elt).pm) + end + return GroupRingElem(result, parent(elt)) end