You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
allocate_result is type-unstable for ProductArray. This appears to be due to type-instability of ManifoldsBase.allocate_result_type for this type. This drastically slows down our allocating functions on product manifolds. Here's an example:
using Manifolds, Test
M =Euclidean(2) ×Euclidean(3)
parray(x) = Manifolds.ProductArray(Manifolds.ShapeSpecification(Manifolds.StaticReshaper(), M.manifolds...), x)
p =parray(randn(5))
julia>@inferred Manifolds.allocate_result(M, Manifolds.log, p, p)
ERROR:return type Manifolds.ProductArray{Manifolds.ShapeSpecification{(1:2, 3:5), Tuple{Tuple{2}, Tuple{3}}, Tuple{Manifolds.StaticReshaper, Manifolds.StaticReshaper}}, Float64, 1, Vector{Float64}, Tuple{Manifolds.SizedAbstractArray{Tuple{2}, Float64, 1, 1, SubArray{Float64, 1, Vector{Float64}, Tuple{UnitRange{Int64}}, true}}, Manifolds.SizedAbstractArray{Tuple{3}, Float64, 1, 1, SubArray{Float64, 1, Vector{Float64}, Tuple{UnitRange{Int64}}, true}}}, Tuple{Manifolds.StaticReshaper, Manifolds.StaticReshaper}} does not match inferred return type Manifolds.ProductArray{Manifolds.ShapeSpecification{(1:2, 3:5), Tuple{Tuple{2}, Tuple{3}}, Tuple{Manifolds.StaticReshaper, Manifolds.StaticReshaper}}, T, 1, _B, _C, Tuple{Manifolds.StaticReshaper, Manifolds.StaticReshaper}} where _C<:Tuplewhere _B<:AbstractVector{T}where T
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] top-level scope
@ REPL[17]:1
The text was updated successfully, but these errors were encountered:
allocate_result
is type-unstable forProductArray
. This appears to be due to type-instability ofManifoldsBase.allocate_result_type
for this type. This drastically slows down our allocating functions on product manifolds. Here's an example:The text was updated successfully, but these errors were encountered: