The Scientific World Journal / 2014 / Article / Alg 4

Research Article

PEM-PCA: A Parallel Expectation-Maximization PCA Face Recognition Architecture

Algorithm 4

Parallel optimized matrix multiplication with its transpose algorithm [27].
Input:  Matrix  input
Output:  Matrix  result
(1)for  i  from  0  to  input_Rows
(2)  for  j  from  0  to  input_Columns
(3)   Calculate  Diagonal Value:  result  [i,i]  +=  (input[i,j]×input[i,j]);
(4)  endfor
(5)endfor
(6)c=0,  b=0;
(7)for  i  from  1  to  input_Rows
(8)  repeat
(9)    Calculate Non-Diagonal Value:  result  [i,c]  +=  (input[i,b]×input[c,b]);
(10)       b++;
(11)       if  (b>=input_Columns)
(12)      c++;
(13)      b=0;
(14)      Copy  lower-diagonal  value  to   upper-diagonal  value:
(15)      result  [c-1,i]=  result  [i,c-1];
(16)     endif
(17)until   (!((c<i)&&(b< input_Columns)))
(18)   endfor
(19)   c=0;
(20)   b=0;