Skip to content

Commit

Permalink
correction
Browse files Browse the repository at this point in the history
  • Loading branch information
kdomino committed Sep 19, 2019
1 parent da46f27 commit 47e4eee
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/symten2mat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,17 @@ Parallel implementation

function computeblock_p(bm::SymmetricTensor{T, N}, i::Tuple{Int, Int}, dims::Tuple) where {T <: AbstractFloat, N}
x = bm.bln^(N-2)
R = SharedArray(zeros(T, (x, makeblocksize(bm, i)...)))
@inbounds R = SharedArray(zeros(T, (makeblocksize(bm, i)..., x)))
@sync @distributed for j in 1:x
@inbounds k = Tuple(CartesianIndices(dims)[j])
for k1 in 1:bm.bln
@inbounds M1 = unfold(getblock(bm, (i[1],k1, k...)),1)
@inbounds M2 = unfold(getblock(bm, (k1,i[2],k...)),2)
@inbounds R[j,:,:] += M1*transpose(M2)
@inbounds R[:,:,j] += M1*transpose(M2)
end
end
R = Array(R)
R = mapreduce(i -> R[i,:,:], +, 1:size(R,1))
return R
@inbounds R = Array(R)
return mapreduce(i -> R[:,:,i], +, 1:size(R,3))
end
"""
cum2mat(bm::SymmetricTensor{T, N}) where {T <: AbstractFloat, N}
Expand Down

2 comments on commit 47e4eee

@kdomino
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/3677

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:

git tag -a v1.2.0 -m "<description of version>" 47e4eee0bf7aa831d6fdfa34583afb08f9da2f88
git push origin v1.2.0

Also, note the warning: Version 1.2.0 skips over 1.1.0
This can be safely ignored. However, if you want to fix this you can do so. Call register() again after making the fix. This will update the Pull request.

Please sign in to comment.