![]() Registered Member ![]()
|
Would it be possible to implement a class that receives a C pointer as a template argument and somehow resolves into a STATIC Eigen matrix BUT USING THAT memory provided?
Say a declaration would look something like: EIGEN_ALIGN16 double array[9]; CMatrix<double,3,3,array> :: m; I DO KNOW ABOUT MAPS but the example code I provide below has proven them to be slower by 20% when compared to STATIC Eigen matrices (see my previous post: viewtopic.php?f=74&t=120985):. These would be the premises:
Would it be possible to implement a solution by adding a new constructor? Say something like: EIGEN_ALIGN16 double data[9]; Eigen::Matrix<double,3,3> m(data); //where data is NOT copied but used to replace the static allocation used by default. Thank you a lot in advance. Find below my code for benchmarking Map vs. Matrix efficiency (from my previous post: http://forum.kde.org/viewtopic.php?f=74&t=120985):
|
Registered users: Baidu [Spider], Bing [Bot], Google [Bot], rblackwell