Skip to content

Conversation

@SobhanMP
Copy link
Member

@SobhanMP SobhanMP commented Sep 1, 2022

closes #237
i'll write tests tomorrow

would it make sense that the functions for transpose/adjoint be added to LinearAlgebra.jl?

can nonzeros be larger than nnz? there are code where it would be valid and code that it would not be.

@dkarrasch
Copy link
Member

But LinearAlgebra doesn't know about SparseXYZ. I think these functions should live here. I remember we have made an effort to implement efficient reduction functions. Don't they apply here? Maybe there is some dispatch going in the wrong direction? Looking at sparsevector.jl lines 1425ff, there is sparsity-aware code.

@dkarrasch
Copy link
Member

Wait. This doesn't apply to SparseVectors, but to sparse matrices? But then again, we have code in sparsematrix.jl lines 2132ff, and seemingly a specialization for +.

Copy link
Member

@dkarrasch dkarrasch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is all actually handled well, see my comment in the original issue. What is missing is a count specialization for Bool sparse arrays.

@SobhanMP
Copy link
Member Author

SobhanMP commented Sep 1, 2022

But LinearAlgebra doesn't know about SparseXYZ.

sure but what ever the parent is, shouldn't Transpose just forward it to the parent? like always as these are not position aware functions

@dkarrasch
Copy link
Member

I see what you mean. Like

iszero(x::AdjOrTrans) = iszero(parent(x))

right?

@SobhanMP
Copy link
Member Author

SobhanMP commented Sep 1, 2022

yeah

@SobhanMP
Copy link
Member Author

SobhanMP commented Sep 1, 2022

closed in favor #244

@SobhanMP SobhanMP closed this Sep 1, 2022
@DilumAluthge DilumAluthge deleted the so/sum branch April 2, 2024 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sum of a Bool sparse array is slow

3 participants