Skip to content

Commit

Permalink
Take adjoint inside FlatteningRF as well
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf committed Dec 4, 2019
1 parent af0b06c commit ce49c7e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion base/reduce.jl
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ struct FlatteningRF{T}
rf::T
end

@inline (op::FlatteningRF)(acc, x) = _foldl_impl(op.rf, acc, x)
@inline function (op::FlatteningRF)(acc, x)
op′, itr′ = _xfadjoint(BottomRF(op.rf), x)
return _foldl_impl(op′, acc, itr′)
end

"""
_xfadjoint(op, itr) -> op′, itr′
Expand Down

0 comments on commit ce49c7e

Please sign in to comment.