diff 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
line wrap: on
line diff
--- a/src/LazyTensors/lazy_tensor_operations.jl	Thu Oct 15 21:06:28 2020 +0200
+++ b/src/LazyTensors/lazy_tensor_operations.jl	Thu Oct 15 22:06:54 2020 +0200
@@ -137,3 +137,7 @@
     A_view = @view llm.A[view_index...]
     return sum(A_view.*v)
 end
+
+function apply_transpose(llm::LazyLinearMap{T,R,D}, v::AbstractArray{T,R}, I::Vararg{Index,D}) where {T,R,D}
+    apply(LazyLinearMap(llm.A, llm.domain_indicies, llm.range_indicies), v, I...)
+end