main/sc/source/core/tool/interpr5.cxx
// Multiply n x m Mat A with m x l Mat B to n x l Mat R
Multiply n x m Mat A with m x l Mat B to n x l Mat R
Multiply n x m Mat A with m x l Mat B to n x l Mat R
void lcl_MFastMult( ScMatrixRef pA, ScMatrixRef pB, ScMatrixRef pR, SCSIZE n, SCSIZE m, SCSIZE l )
{
    double sum;
    for (SCSIZE row = 0; row < n; row++)
    {
        for (SCSIZE col = 0; col < l; col++)
        {   
            sum = 0.0;
            for (SCSIZE k = 0; k < m; k++)
                sum += pA->GetDouble(k,row) * pB->GetDouble(col,k);
            pR->PutDouble(sum, col, row);
        }
    }
}
void lcl_MFastMult ( ScMatrixRef pA , ScMatrixRef pB , ScMatrixRef pR , SCSIZE n , SCSIZE m , SCSIZE l ) { double sum ; for ( SCSIZE row = 0 ; row < n ; row ++ ) { for ( SCSIZE col = 0 ; col < l ; col ++ ) { sum = 0.0 ; for ( SCSIZE k = 0 ; k < m ; k ++ ) sum += pA -> GetDouble ( k , row ) * pB -> GetDouble ( col , k ) ; pR -> PutDouble ( sum , col , row ) ; } } }
Multiply n x m Mat A with m x l Mat B to n x l Mat R
Multiply n x m Mat A with m x l Mat B to n x l Mat R
// result element(col, row) =sum[ (row of A) * (column of B)]