aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/InsideEigenExample.dox
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2008-12-08 10:07:09 +0000
committerGravatar Gael Guennebaud <g.gael@free.fr>2008-12-08 10:07:09 +0000
commit52a30c1d54d1c228b88cd54eac3de370699fa557 (patch)
treecdc7a01adac903e675e341735332200998e9e678 /doc/InsideEigenExample.dox
parentcb409914e01ef7b3b6d6279da43065ddf7070f46 (diff)
fix minor mistake in the inside eigen example
Diffstat (limited to 'doc/InsideEigenExample.dox')
-rw-r--r--doc/InsideEigenExample.dox2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/InsideEigenExample.dox b/doc/InsideEigenExample.dox
index d4a892a2e..22635120b 100644
--- a/doc/InsideEigenExample.dox
+++ b/doc/InsideEigenExample.dox
@@ -60,7 +60,7 @@ SSE2, like AltiVec, is a set of instructions allowing to perform computations on
However, in the above program, we have chosen size=50, so our vectors consist of 50 float's, and 50 is not a multiple of 4. This means that we cannot hope to do all of that computation using SSE2 instructions. The second best thing, to which we should aim, is to handle the 48 first coefficients with SSE2 instructions, since 48 is the biggest multiple of 4 below 50, and then handle separately, without SSE2, the 49th and 50th coefficients. Something like this:
\code
- for(int i = 0; i < size/4; i++) u.packet(i) = v.packet(i) + w.packet(i);
+ for(int i = 0; i < 4*(size/4); i+=4) u.packet(i) = v.packet(i) + w.packet(i);
for(int i = 4*(size/4); i < size; i++) u[i] = v[i] + w[i];
\endcode