This forum has been archived. All content is frozen. Please use KDE Discuss instead.

QR updates

Tags: None
(comma "," separated)
bravegag
Registered Member
Posts
52
Karma
0

QR updates

Sun Apr 22, 2012 11:31 pm
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
jitseniesen
Registered Member
Posts
204
Karma
2

Re: QR updates

Mon Apr 23, 2012 8:12 am
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.
bravegag
Registered Member
Posts
52
Karma
0

Re: QR updates

Mon Apr 23, 2012 12:20 pm
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.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: QR updates

Tue Apr 24, 2012 11:57 am
regarding buffer pooling and more generally custom matrix allocation, there is a plan which consists in adding a custom allocator...
bravegag
Registered Member
Posts
52
Karma
0

Re: QR updates

Wed Apr 25, 2012 3:50 pm
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.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: QR updates

Thu Apr 26, 2012 6:32 am
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.
bravegag
Registered Member
Posts
52
Karma
0

Re: QR updates

Fri Jun 07, 2013 9:15 am
jitseniesen wrote: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.


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
micagordon
Registered Member
Posts
6
Karma
0

Re: QR updates

Mon Mar 23, 2015 6:11 am
bravegag wrote:
jitseniesen wrote: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.


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 QRafter 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

Thanks! :P I'll try the code now.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]