-
Notifications
You must be signed in to change notification settings - Fork 27
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
Use mp++ types in armadillo (proof of concept) #207
Comments
Hi @chatziko, that is indeed a good suggestion. I would be willing to incorporate explicit support for armadillo's types directly within mp++, perhaps in the form of a header in the I have never used armadillo myself however, so probably the best way to proceed would be if you could open a PR and then we could work on it together. |
Ok, I'll try to open a PR when I find some time. Quick question: one problem I found in supporting more armadillo operations is that it sometimes uses
My understanding is that mp++ doesn't allow implicit conversions, so this will fail when |
Yes, disallowing implicit conversions was a conscious design decision from the very beginning. I find them complex to reason about and generally speaking I try not to rely on/use them in my code. It is unfortunate that initialization in the form I don't see an easy way out of this situation, apart from some hacky preprocessor logic to shut off the |
I made a PR to armadillo, let's see how this goes 😄 https://gitlab.com/conradsnicta/armadillo-code/merge_requests/93 |
Great, thanks! I'll follow the discussion there. |
The following repo shows that armadillo can be monkey-patched to support mp++ types as elements (
integer
andrational
, but others could be easily added).https://github.com/chatziko/arma-mppp
A variety of basic operations are supported, and I'm sure others could be added.
Of course I wouldn't expect performance similar to BLAS, but using armadillo to do linear algebra with mp++'s exact arithmetic could be super useful. I'd love to see something like this included in mp++, I think it's a natural fit for armadillo!
The text was updated successfully, but these errors were encountered: