Details
Diff Detail
- Repository
- rB Blender
- Branch
- onl
Event Timeline
@Sergey Sharybin (sergey), @Campbell Barton (campbellbarton), not asking for a code review, but I'm wondering where to put this code. There's no point in having a separate OpenNL library anymore, it's only 400 lines of code to simplify sparse matrix solving now.
But where to put this code then? I could put it in the extern/Eigen3/intern but it's a bit more than just a C API wrapper over Eigen. I'd prefer to put this in blenlib as BLI_linear_solver.h, but the implementation uses C++, and if I remember correctly we have a rule against mixing C/C++ code in one module. It seems reasonable to me in this case.
@Brecht Van Lommel (brecht), we indeed don't mix c and c++ code and I don't see anything wrong putting the code to extern\Eigen\intern. I don't remember any rule of only having c-api in such folders. In fact, such a rule is already violated in libmv, ocio, osd..
If the new code is based on Eigen, simply put it to Eigen\intern and move ahead without spending too much time in controversial topics? :)
Regarding Eigen3,
Currently we have a CMake option WITH_SYSTEM_EIGEN3 which is being ignored in places, since we're referencing extern/Eigen3 instead of EIGEN3_INCLUDE_DIRS in a few places.
It may be best to move our own Eigen wrapper code to intern/Eigen3_capi for eg so we can make use of system Eigen3.
Thanks guys, I've moved it all into a new intern/eigen module.
It should also use EIGEN3_INCLUDE_DIRS everywhere now for CMake.