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
We end up taking a power of a NoTransportOrigin, which makes no sense. As a quick fix, I temporarily changed MeasureBase._origin_depth to
@inlinefunction_origin_depth(ν::NU) where {NU}
ν_0 = ν
Base.Cartesian.@nexprs10 i ->begin# 10 is just some "big enough" number
ν_{i} =transport_origin(ν_{i -1})
if ν_{i} isa PowerMeasure
ν_{i} = ν_{i}.parent
elseif ν_{i} isa NoTransportOrigin
returnstatic(i -1)
endendreturnstatic(10)
end
This last part feels kind of hacky. Also, we have the problem that map forces allocation. It would be nice to use mappedarray instead, but that doesn't infer properly. Maybe a modification of it could?
Also, it seems like a problem if we have a product with different "origin depths". A fixpoint approach would handle this, but I think the current approach will break. Any ideas for this @oschulz ?
The text was updated successfully, but these errors were encountered:
a problem if we have a product with different "origin depths"
Well, if it's a tuple-based product, the transport for each marginal should generate separate code and everything should infer. And if it's array-based the marginals have different depth then they also have different type, so type-inference is probably hopeless anyway, right?
I got this working, sort of:
To do this, I added
for_constructor
that's likeFor
, but a little smarter - it might sometimes collapse to a power measure:Then we just need the standard stuff:
Well, almost. There's also this bug:
We end up taking a power of a
NoTransportOrigin
, which makes no sense. As a quick fix, I temporarily changedMeasureBase._origin_depth
toThis last part feels kind of hacky. Also, we have the problem that
map
forces allocation. It would be nice to usemappedarray
instead, but that doesn't infer properly. Maybe a modification of it could?Also, it seems like a problem if we have a product with different "origin depths". A fixpoint approach would handle this, but I think the current approach will break. Any ideas for this @oschulz ?
The text was updated successfully, but these errors were encountered: