reverse certain inner loops. Now the benchmark runs in 3.5s instead of 5.5s before!

This commit is contained in:
Benoit Jacob
2007-10-08 07:24:00 +00:00
parent f0be175bdc
commit ac6ff5efd6
3 changed files with 3 additions and 3 deletions

View File

@@ -32,11 +32,11 @@ struct EiDotUnroller
static void run(const Derived1 &v1, const Derived2& v2, typename Derived1::Scalar &dot)
{
const int i = Index - 1;
EiDotUnroller<Index-1, Size, Derived1, Derived2>::run(v1, v2, dot);
if(i == Size - 1)
dot = v1[i] * EiConj(v2[i]);
else
dot += v1[i] * EiConj(v2[i]);
EiDotUnroller<Index-1, Size, Derived1, Derived2>::run(v1, v2, dot);
}
};