-
Notifications
You must be signed in to change notification settings - Fork 10
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
Remove type piracy #24
Comments
There is something to be said in favor of the current type piracy approach. If a package uses the LinearAlgebra |
Yeah, that's true. An alternative would be for the sparse matrix multiplication API to let you set a "backend" that does the computation. Basically, separate the concept of sparse matrix multiplication from the implementation that currently is in Base. |
But even in that case, the package would still need to expose the |
Well, what happens if there is another package that provides sparse matrix multiplication using some other backend? And what happens when both those packages happen to be loaded? |
If both packages implement the same behaviour, the result is the same, only performance changes. But I do get your point. The idiomatic Julian approach would be to have the user wrap whatever input in a new type owned by MKLSparse, and have the MKLSparse |
Perhaps there could be a macro? E.g. |
I don't see how that would be straight forward if the |
The matrix multiplication here should likely be implemented with an
MKLSparse.matmul
or something instead of type piracying the Base matrix multiplication with more specific versions.The text was updated successfully, but these errors were encountered: