Mercurial > repos > public > sbplib_julia
comparison src/LazyTensors/lazy_tensor_operations.jl @ 415:814865d40f48 feature/tensor_composition
Merge in default
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 16 Oct 2020 09:34:50 +0200 |
parents | d94891b8dfca 4aa59af074ef |
children | 4c6604b7d990 |
comparison
equal
deleted
inserted
replaced
412:d94891b8dfca | 415:814865d40f48 |
---|---|
133 view_index = Base.setindex(view_index, Int(I[i]), llm.range_indicies[i]) | 133 view_index = Base.setindex(view_index, Int(I[i]), llm.range_indicies[i]) |
134 end | 134 end |
135 A_view = @view llm.A[view_index...] | 135 A_view = @view llm.A[view_index...] |
136 return sum(A_view.*v) | 136 return sum(A_view.*v) |
137 end | 137 end |
138 | |
139 function apply_transpose(llm::LazyLinearMap{T,R,D}, v::AbstractArray{T,R}, I::Vararg{Index,D}) where {T,R,D} | |
140 apply(LazyLinearMap(llm.A, llm.domain_indicies, llm.range_indicies), v, I...) | |
141 end |