Closed skn123 closed 8 years ago
It looks like it would be pretty simple to write functions that would convert a GVec instance to/from an Eigen Array
Mike, indeed, that is what would be ideal for a start. Eigen supports all linear algebra routines that Waffles would need. So, in the long run, it would be pertinent to make GMatrix derive all utilities from Eigen/Dense and Eigen/Sparse. If you need to add GPU compatibility to Waffles, then ViennaCl can also be considered as it mimics most of the functionality of Eigen (and even more vis-a-vis by way of adding GPU support).
I added a very simple demo, waffles/demos/eigen, which links to both libraries. It converts a matrix back and forth. It is not much, but it is a starting point. I have not yet ported it to Windows, but that should be pretty simple. Since I am not currently using Eigen for anything, this is about as far as I plan to take this effort, for now.
If you feel inclined to drive it a little further, that would be fine with me. The GClasses library does not depend on any non-standard libraries, and I intend to keep it that way, but I would be happy to add another library to the Waffles suite that depends on Eigen. (I have been putting libraries with external dependencies in the waffles/src/depends folder.)
Mike, I updated the code, but could not find this file, Can you please indicate where this file is located or has it been checked in?
It's in waffles/demos/eigen/src. This page shows that it is in the GitHub repository: https://github.com/mikegashler/waffles/tree/master/demos/eigen/src
Mike, Would it be possible to add support for Eigen? I think the fundamental data structure would be a change in GMatrix, but that would involve a lot of changes in the code. A short-term solution would be to interface an Eigen matrix with Waffles.