Mercurial > repos > public > sbplib_julia
comparison src/LazyTensors/lazy_tensor_operations.jl @ 411:4aa59af074ef feature/LazyLinearMap/transpose
Add implementation of apply_transpose for LazyLinearMap
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 15 Oct 2020 22:06:54 +0200 |
parents | 1936e38fe51e |
children | 814865d40f48 2808c41f5efa 46acb2560451 |
comparison
equal
deleted
inserted
replaced
410:26e186b565b3 | 411:4aa59af074ef |
---|---|
135 view_index = Base.setindex(view_index, Int(I[i]), llm.range_indicies[i]) | 135 view_index = Base.setindex(view_index, Int(I[i]), llm.range_indicies[i]) |
136 end | 136 end |
137 A_view = @view llm.A[view_index...] | 137 A_view = @view llm.A[view_index...] |
138 return sum(A_view.*v) | 138 return sum(A_view.*v) |
139 end | 139 end |
140 | |
141 function apply_transpose(llm::LazyLinearMap{T,R,D}, v::AbstractArray{T,R}, I::Vararg{Index,D}) where {T,R,D} | |
142 apply(LazyLinearMap(llm.A, llm.domain_indicies, llm.range_indicies), v, I...) | |
143 end |