|[eigen] 4x4 matrix inverse|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: [eigen] 4x4 matrix inverse
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Fri, 4 Dec 2009 07:35:23 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=9T7MCE0LTcXcAmymTtOp9g7Y2XndSEejEEMAPVVIbhc=; b=kxd2gH5jDqZlbEcaxhFDAS0/JCZmcVSiX/MYAHy22HqpN5xW6zB0degYV51JPYmXxH w3pWtGw6+IojRvw21zMrOmKw6AK+Dd9IhSPJl84zIGUfUHHU/w5QVMhixqJmoYb2+2IW pTu/jd5gFtUt9sPEL4sOdQBXvipir1HVdkmQI=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=qiZw5jhGrDodokj43EgRrV3nJwXqmMP3Rbcc+MP+F1V7VQDLgk2afeb0kAO+5FC1kd JGfyPXG3OhnOKjjMztSsQ0AKxKP4DGVS5yta2BBqZgqBEtCpDh88f2qiDBkNCGNt41ww pKabOH8ikPf6+gsRZA6DewCh+Uwv5txiez/0E=
Long ago I thought it would be a good idea to optimize 4x4 matrix
inverse using "Euler's trick" which reduced greatly the number of
operations but relies on some 2x2 block inside the matrix being
The problem is that this gives bad precision, and the best compromise
that I could find between precision and performance is still:
- 10x more imprecise in the worst case
- only 25% faster.
My last reason to clinge to this approach is that it was supposedly
more vectorizable, but reading this,
I realized that Intel engineers actually figured how to vectorize the
plain old cofactors approach very efficiently.
So I'll switch to cofactors in both branches, I think. I'll also
implement SSE at least in the default branch.
Question: do you think that Intel's code is provided free of use? Or
should I avoid looking at it? Even if I can't look at it, they still
provide good explanations.