mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-11-19 15:25:29 +01:00
replace groupring_square by fmac! (which is almost allcation free)
This commit is contained in:
parent
1432467d74
commit
fc496e29f5
@ -3,26 +3,11 @@ using IntervalArithmetic
|
|||||||
IntervalArithmetic.setrounding(Interval, :tight)
|
IntervalArithmetic.setrounding(Interval, :tight)
|
||||||
IntervalArithmetic.setformat(sigfigs=12)
|
IntervalArithmetic.setformat(sigfigs=12)
|
||||||
|
|
||||||
function groupring_square(pm, vect::AbstractVector)
|
function compute_SOS(pm::Array{I,2}, Q) where I<:Integer
|
||||||
zzz = zeros(eltype(vect), maximum(pm))
|
result = zeros(eltype(Q), maximum(pm));
|
||||||
return GroupRings.mul!(zzz, vect, vect, pm)
|
for i in 1:size(Q,2)
|
||||||
end
|
GroupRings.fmac!(result, view(Q,:,i), view(Q,:,i), pm)
|
||||||
|
|
||||||
function compute_SOS(pm::Array{I,2}, Q::AbstractArray) where I<:Integer
|
|
||||||
|
|
||||||
# result = zeros(eltype(Q), maximum(pm))
|
|
||||||
# r = similar(result)
|
|
||||||
# for i in 1:size(Q,2)
|
|
||||||
# print(" $i")
|
|
||||||
# result += GroupRings.mul!(r, view(Q,:,i), view(Q,:,i), pm)
|
|
||||||
# end
|
|
||||||
|
|
||||||
@everywhere groupring_square = PropertyT.groupring_square
|
|
||||||
|
|
||||||
result = @parallel (+) for i in 1:size(Q,2)
|
|
||||||
groupring_square(pm, Q[:,i])
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return result
|
return result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user