Registered Member
|
Hello,
Does Eigen support QR updates and if so which ones? I have use-cases for QR updates: add column block, delete column block, append row block. Many thanks in advance, Best regards, Giovanni |
Registered Member
|
As far as I know, nothing of this kind has been implemented, so you're on your own. Please let us know if you write something yourself.
|
Registered Member
|
To be honest I have implemented a C++ template matrix and vector classes tailored for my algorithm needs and it is built upon LAPACK & BLAS and has already all the QR updates implemented and tested, specially the updates sandwiching which became sort of a complex state machine. The problem is that my C++ implementation now needs expression templates etc and it is leaning more into a bigger framework like Eigen so I was wondering about the cost-benefit of continuing on my own versus reusing Eigen. I also have a strong requirement for buffer-pooling the matrix and vector memory and e.g. overloading new and delete operators since my algorithm uses a well known limited number of matrices and vectors and I don't think this is supported in Eigen either.
AFAIK Eigen implements everything e.g. QR and optionally wraps MKL etc. My implementation only builds on top of MKL and I dont need to implement a QR updates "manually" counterpart. |
Moderator
|
regarding buffer pooling and more generally custom matrix allocation, there is a plan which consists in adding a custom allocator...
|
Registered Member
|
Actually the buffer pooling is quite simple and super efficient, I gained orders of magnitude speedup without sacrificing OO design by using an implementation derived from this StackOverflow question and rough implementation I posted here:
http://stackoverflow.com/questions/1003 ... uffer-pool Using that buffer pool I get enough pre-allocated and contiguous aligned memory which minimizes the chances of page swapping for my algorithm. I figured integrating this in Eigen would be a lot of work because you have lot of matrix derived types and in my tailored implementation I have ofc only one type. |
Moderator
|
no, storage allocation appears at a single place, i.e., in the DenseStorageBase class. The idea behind custom allocators is to replace malloc by your own function, for instance a pool allocator for which standard implementations already exist.
|
Registered Member
|
You can find my Thesis work and the C++ implementation for some of the handcrafted QR updates in this project code: http://hpsfo.bitbucket.org the code for updating QR after deleting one column is handcraft greatly optimized (assuming a block size and doing blocking, loop unrolling and scalar replacement with OpenMP). The C++ code to re-triangularize a broken R after deleting one column with N_B=8 can be seen in the function https://bitbucket.org/hpsfo/hpsfo.bitbucket.org/src/563a3c12cba13ef6b5bb2b9aad6f76687b7d4e0c/code/src/sfo_matrix_tria.h?at=master#cl-1586. Best regards, Giovanni |
Registered Member
|
Thanks! I'll try the code now. |
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]