Skip to content

Commit ce49c7e

Browse files
committed
Take adjoint inside FlatteningRF as well
1 parent af0b06c commit ce49c7e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

base/reduce.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,10 @@ struct FlatteningRF{T}
111111
rf::T
112112
end
113113

114-
@inline (op::FlatteningRF)(acc, x) = _foldl_impl(op.rf, acc, x)
114+
@inline function (op::FlatteningRF)(acc, x)
115+
op′, itr′ = _xfadjoint(BottomRF(op.rf), x)
116+
return _foldl_impl(op′, acc, itr′)
117+
end
115118

116119
"""
117120
_xfadjoint(op, itr) -> op′, itr′

0 commit comments

Comments
 (0)