-
Notifications
You must be signed in to change notification settings - Fork 5
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
Implement CSR hierarchy #19
Comments
I'm ready to take this on. However, I need some explanation of the current code structure |
@tdegeus as @JohanMabille said the
So I think it's a copy-paste of @JohanMabille adds the |
@tdegeus I don't know if you had time to make progress in the implementation of CSR format. I wrote a data structure to be able to manage the COO and CSR (and CSF for ND) at the same time. You can see the code here https://gist.github.com/gouarin/f5f3952ff494b326e77e1af01e3219c3 Finally, it will be easier to split the implementation for COO (where pos vector doesn't exist) and for CSR/CSF (when pos vector exists) and to implement It's just an idea. Feel free to comment or add your own implementation. |
@gouarin Nice. Can you explain your implementation a bit? In particular, what are |
A different point of discussion is that I'm a bit worried about just created an n-d array. I think there should maybe be a dedicated 2-d matrix as it would be easier to interface with solvers if the storage is classically in three contiguous arrays. Also because many of the storage strategies are there to do efficient linear algebra, much more than saving on storage. In more broader sense I am having difficulties understanding the current implementation, it would help if you could explain a bit, before I start 'reinventing the wheel'. E.g. what should be the relation between a specific implementation (e.g. CSR) and |
The If I resume, the COO format only needs the size of the coordinate arrays for each dimension and loop over this These two implementations should work with third-party software since you have the right information. For example, for the CSR: The only relation between CSR and Hope that I help you to better understand my implementation. |
If the solvers work with the storage itself rather than with APIs of the storage, then 2-D matrix should indeed be a specialization of the N-D case so it's easy to interface it with existing solvers. |
The CSR hierarchy should implement sparse tensors (N-D) with CSR format. This should follow the same pattern as xmap_container classes:
xcsr_container
is a CRTP base class that gathers common implementation and API of inheriting classesxcsr_array
inherits fromxcsr_container
and implements the case where the number of dimensions is dynamicxcsr_tensor
inherits fromxcsr_container
and implements the case where the number of dimensions is staticThe text was updated successfully, but these errors were encountered: