Skip to content

Commit

Permalink
Add sparse_storage for Adjoint and Transpose
Browse files Browse the repository at this point in the history
  • Loading branch information
lkdvos committed Nov 15, 2024
1 parent 3efdb89 commit d1a5b53
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ function stored_indices(a::Adjoint)
return Iterators.map(I -> CartesianIndex(reverse(Tuple(I))), stored_indices(parent(a)))
end
stored_length(a::Adjoint) = stored_length(parent(a))
sparse_storage(a::Adjoint) = Iterators.map(adjoint, sparse_storage(parent(a)))

function stored_indices(a::Transpose)
return Iterators.map(I -> CartesianIndex(reverse(Tuple(I))), stored_indices(parent(a)))
end
stored_length(a::Transpose) = stored_length(parent(a))
sparse_storage(a::Transpose) = Iterators.map(transpose, sparse_storage(parent(a)))

0 comments on commit d1a5b53

Please sign in to comment.