Page 1 of 1

Subroutine question: DLARFX

PostPosted: Wed Mar 22, 2006 3:33 am
by chansoncheng
Hello.

My question:

I am looking over the code for DLARFX. The purpose state the following: DLARFX applying a real elementary reflector H to a real m by n matrix C, from either the left or the right. H is represented in the form: H = I - tau * v * v', where tau is a real scalar and v is a real vector. If tau = 0, then H is taken to be the unit matrix.

I have no idea about the term "elementary reflector" and the background knowledge. Somebody please clarify for me.

Ps. Actually, I was asked to optimize this routine. It would be highlyappreciated if someone could give me some recommendations or approaches.

Thanks a lot.

PostPosted: Wed Mar 22, 2006 9:45 am
by sven
See:

@BOOK{GV:96,
AUTHOR = {Golub, G. H. and Van Loan, C. F.},
TITLE = {Matrix Computations},
EDITION = {3rd},
PUBLISHER = {The Johns Hopkins University Press},
ADDRESS = {Baltimore, MD, USA},
YEAR = {1996},
ISBN = {0-8018-5414-8} }

section 5.1. Golub and Van Loan call them Householder reflections. For efficiency, LAPACK itself applies several reflections at once in block form whenever possible, because then the Level 3 BLAS can be used. This approach is described in section 5.1.7 of the above reference. DLARFX only uses the Level 2 BLAS. I suspect that it will be hard to optimize the routine as most of the computational effort is in the Level 2 BLAS routines DGEMV and DGER.

Best wishes,

Sven Hammarling.

P.S. Julien Langou reminded me that there already is some optimization in the form of loop unrolling for Householder reflections up to 10 by 10.

PostPosted: Wed Mar 22, 2006 8:33 pm
by chansoncheng
:D
I do appreciate your help!

Kevin Cheng