From 0fc46fc9590912bf6925c899edd02d7a2cdf5f79 Mon Sep 17 00:00:00 2001 From: dan miller Date: Fri, 19 Oct 2007 04:28:53 +0000 Subject: adding ode source to /libraries --- "libraries/ode-0.9\\/ode/src/fastdot.c" | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 "libraries/ode-0.9\\/ode/src/fastdot.c" (limited to 'libraries/ode-0.9\/ode/src/fastdot.c') diff --git "a/libraries/ode-0.9\\/ode/src/fastdot.c" "b/libraries/ode-0.9\\/ode/src/fastdot.c" new file mode 100755 index 0000000..148d2dd --- /dev/null +++ "b/libraries/ode-0.9\\/ode/src/fastdot.c" @@ -0,0 +1,30 @@ +/* generated code, do not edit. */ + +#include "ode/matrix.h" + + +dReal dDot (const dReal *a, const dReal *b, int n) +{ + dReal p0,q0,m0,p1,q1,m1,sum; + sum = 0; + n -= 2; + while (n >= 0) { + p0 = a[0]; q0 = b[0]; + m0 = p0 * q0; + p1 = a[1]; q1 = b[1]; + m1 = p1 * q1; + sum += m0; + sum += m1; + a += 2; + b += 2; + n -= 2; + } + n += 2; + while (n > 0) { + sum += (*a) * (*b); + a++; + b++; + n--; + } + return sum; +} -- cgit v1.1