Changed the default matrix multiplication expression object slightly

to optimize it a little more.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403101
This commit is contained in:
Davis King 2009-06-26 12:35:27 +00:00
parent 9da5852d7d
commit 002683b1fa
1 changed files with 10 additions and 10 deletions

View File

@ -216,12 +216,12 @@ namespace dlib
inline const static type eval (
const RHS_& rhs,
const LHS_& lhs,
long r,
long c
const long r,
const long c
)
{
type temp = type();
for (long i = 0; i < rhs.nr(); ++i)
type temp = lhs(r,0)*rhs(0,c);
for (long i = 1; i < rhs.nr(); ++i)
{
temp += lhs(r,i)*rhs(i,c);
}
@ -241,12 +241,12 @@ namespace dlib
inline const static type eval (
const RHS_& rhs,
const LHS_& lhs,
long r,
long c
const long r,
const long c
)
{
type temp = type();
for (long i = 0; i < lhs.nc(); ++i)
type temp = lhs(r,0)*rhs(0,c);
for (long i = 1; i < lhs.nc(); ++i)
{
temp += lhs(r,i)*rhs(i,c);
}
@ -347,8 +347,8 @@ namespace dlib
}
inline const type operator() (
long r,
long c
const long r,
const long c
) const
{
return matrix_multiply_helper<LHS,RHS>::eval(rhs,lhs,r,c);