Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A[c|t]_mul_B[!] specializations for SparseMatrixCSC-StridedVecOrMat, less generalized linear indexing and meta-fu #20043

Merged
merged 1 commit into from
Jan 15, 2017

Conversation

Sacha0
Copy link
Member

@Sacha0 Sacha0 commented Jan 15, 2017

Towards fixing some generalized linear indexing deprecation warnings in #20040, this pull request rewrites the A[c|t]_mul_B[!] specializations for SparseMatrixCSC-StridedVecOrMat combinations, leveraging multiple dispatch and higher order functions to remove generalized linear indexing and meta-fu. cc @mbauman. Best!

…cOrMat combinations, without generalized linear indexing and meta-fu.
@Sacha0 Sacha0 added linear algebra Linear algebra sparse Sparse arrays labels Jan 15, 2017
@andreasnoack
Copy link
Member

Could you explain the connection to generalized linear indexing and why it fixes the issue?

@Sacha0
Copy link
Member Author

Sacha0 commented Jan 15, 2017

Could you explain the connection to generalized linear indexing and why it fixes the issue?

The existing implementation uses generalized linear indexing (when indexing B and C), whereas the implementation in this PR does not (by providing separate kernels for StridedVector B/C and StridedMatrix B/C). Removing these uses of generalized linear indexing fixes some depwarns in #20040, e.g. those appearing in the sparse/spqr tests. Does that clarify? Best!

@andreasnoack
Copy link
Member

So the problem is indexing a vector with two indices? I thought that generalized linear indexing was about indexing an N dimensional array with n indices where 1 < n < N. The old behavior (which I though we called trailing singleton dimension) is pretty convenient in this case where it allows us to avoid duplication of the kernel.

@Sacha0
Copy link
Member Author

Sacha0 commented Jan 15, 2017

So the problem is indexing a vector with two indices? I thought that generalized linear indexing was about indexing an N dimensional array with n indices where 1 < n < N. The old behavior (which I though we called trailing singleton dimension) is pretty convenient in this case where it allows us to avoid duplication of the kernel.

@andreasnoack, please see #20040. Best!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linear algebra Linear algebra sparse Sparse arrays
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants