Draft: ENH: sparse: rewrite get_thunk to support creation of csr_array struct#25117
Draft
dschult wants to merge 3 commits into
Draft
Draft: ENH: sparse: rewrite get_thunk to support creation of csr_array struct#25117dschult wants to merge 3 commits into
get_thunk to support creation of csr_array struct#25117dschult wants to merge 3 commits into
Conversation
but no functions that use 'C' yet. Make sure tests pass. shift max_array_size to 1st pass. simplify typenum processing make 2nd pass use switch like 1st pass
70e92b9 to
74e6c5f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR shows how the sparsetools core function
get_thunkcan take CSR/CSC input directly to the acsr_arraystruct rather than having the inner functions create/package the struct. The sparsetoolsspecis given a new symbol 'C' in addition toilITBVW. Previously many functions usediiIITto denote the 5 input args to describe each CS input. Some function have 2 input arrays and 1 output array so they end up with 15 args!! This PR change could cut that to 3. The resulting code is arguably nicer too -- certainly the function signatures are.This proof of concept rewrites
get_thunkin the first commit and then in 2nd commit it implements thecsr_todensefunction using the sparsetools spec'C*T'instead of'iiIIT*T'.I'm putting this up as a draft PR for feedback. There is still a bunch of work to be done including runtime benchmarks, RAM needs, compile time, size of
.sofiles, etc.cc: @perimosocordiae @stefanv