1
0
mirror of https://github.com/kalmarek/Groups.jl.git synced 2024-11-04 02:50:28 +01:00

make wl_ball thread safe: pre-compute normalforms!

This commit is contained in:
Marek Kaluba 2022-11-15 19:52:40 +01:00
parent 22c21706d8
commit 9006f8a4a1
No known key found for this signature in database
GPG Key ID: 8BF1A3855328FC15

View File

@ -34,7 +34,8 @@ function _wlmetric_ball(S, old, radius, op, collect, unique)
for r in 2:radius for r in 2:radius
old = let old = old, S = S, old = let old = old, S = S,
new = collect( new = collect(
(g = op(o, s); hash(g); g) (g = op(o, s); normalform!(g); hash(g); g)
# normalform! and hash are to make assure thread-safety of produced elts
for o in @view(old[sizes[end-1]:end]) for s in S for o in @view(old[sizes[end-1]:end]) for s in S
) )