Re: [eigen] Specialized QR

[ Thread Index | Date Index | More Archives ]

there we go, yet another spam from me.

i remember you said that Givens was only preferable for size==2. so is
your QR restricted to that case? that would explain a lot of stuff i
didn't understand at first about your code, like why your m_qr had
only 2 rows... you've got to explain me, i can't guess everything ;-)

also i guess that means that your benchmark was for 2 rows so you
meant up to size 2x150 and not 150x150... now it makes sense that it's
much faster than householder in that case.

what i really don't understand is, that 2xN QR is basically one
operation, so i guess you meant something else.. like 2xN RQ or Nx2 QR

also is any of these cases important? naively i would have thought
that the only important case with 2 rows is ... 2x2. For the rest it's
probably not a big deal to fall back to Gram-Schmidt...


2009/5/16 Benoit Jacob <jacob.benoit.1@xxxxxxxxx>:
> yet another thing:
> if (b == Scalar(0))
> this needs to be replaced by the appropriate fuzzy comparison
> (ei_isMuchSmallerThan with appropriate parameters depending on your
> context).
> As we always say... implementing a basic version of a numeric
> algorithm is only the beginning... then the real "fun" begins!
> Benoit
> 2009/5/17 Benoit Jacob <jacob.benoit.1@xxxxxxxxx>:
>> One more thing...
>> While your code is a great start for Givens-based QR, it is not what
>> we mean by "QR specialized for fixed-size". For example, the QR
>> currently in Eigen, when applied to a fixed-size matrix, specializes
>> exactly as well as your code to that case. But when we say that having
>> fixed-size specializations would be nice, we mean something else:
>> compilers tend to do a poor job unrolling nested for loops, so what we
>> really mean is that we'd need either hand-unrolled or meta-unrolled
>> code. For examples of meta-unrolled code, you can have a look at the
>> unrollers in Eigen/src/Core/Assign.h. For examples of hand-unrolled
>> specializations (moreover using custom algorithms depending on the
>> matrix size) have a look at Eigen/src/LU/Inverse.h. These are two
>> possible approaches. This is the kind of optimizations for fixed-size
>> that we had in mind when we said "fixed-size specializations of QR".
>> Cheers,
>> Benoit

Mail converted by MHonArc 2.6.19+