@@ -52,21 +52,22 @@ function Base.summary(io::IO, P::AssociatedLegendrePolynomials)
52
52
end
53
53
end
54
54
55
- function Base. deepcopy_internal (S:: SphericalHarmonicsCache , stackdict:: IdDict )
56
- _C = Base. deepcopy_internal (S. C, stackdict)
57
- _P = Base. deepcopy_internal (S. P, stackdict)
58
- _Y = Base. deepcopy_internal (S. Y, stackdict)
59
- _SHT = Base. deepcopy_internal (S. SHType, stackdict)
60
- typeof (S)(_C, _P, _Y, _SHT)
61
- end
62
-
63
- function Base. deepcopy_internal (P:: AssociatedLegendrePolynomials , stackdict:: IdDict )
64
- _cosθ = Base. deepcopy_internal (P. cosθ, stackdict)
65
- _lmax = Base. deepcopy_internal (P. lmax, stackdict)
66
- _P = Base. deepcopy_internal (P. P, stackdict)
67
- _initialized = Base. deepcopy_internal (P. initialized, stackdict)
68
- typeof (P)(_cosθ, _lmax, _P, _initialized)
69
- end
55
+ # Optimized deepcopy, but this leads to a lot of invalidations
56
+ # function Base.deepcopy_internal(S::SphericalHarmonicsCache, stackdict::IdDict)
57
+ # _C = Base.deepcopy_internal(S.C, stackdict)
58
+ # _P = Base.deepcopy_internal(S.P, stackdict)
59
+ # _Y = Base.deepcopy_internal(S.Y, stackdict)
60
+ # _SHT = Base.deepcopy_internal(S.SHType, stackdict)
61
+ # typeof(S)(_C, _P, _Y, _SHT)
62
+ # end
63
+
64
+ # function Base.deepcopy_internal(P::AssociatedLegendrePolynomials, stackdict::IdDict)
65
+ # _cosθ = Base.deepcopy_internal(P.cosθ, stackdict)
66
+ # _lmax = Base.deepcopy_internal(P.lmax, stackdict)
67
+ # _P = Base.deepcopy_internal(P.P, stackdict)
68
+ # _initialized = Base.deepcopy_internal(P.initialized, stackdict)
69
+ # typeof(P)(_cosθ, _lmax, _P, _initialized)
70
+ # end
70
71
71
72
function SphericalHarmonicsCache (T:: Type , lmax:: Int , :: Type{m_range} , SHType) where {m_range}
72
73
C = compute_coefficients (T, lmax)
@@ -1130,4 +1131,6 @@ function sphericalharmonic(θ, ϕ, l::Integer, m::Integer, SHType::HarmonicType
1130
1131
norm * P
1131
1132
end
1132
1133
1134
+ include (" precompile.jl" )
1135
+
1133
1136
end
0 commit comments