~ubuntu-branches/ubuntu/vivid/atlas/vivid

« back to all changes in this revision

Viewing changes to tune/blas/gemm/CASES/ATL_mmK8.c

  • Committer: Bazaar Package Importer
  • Author(s): Camm Maguire
  • Date: 2002-04-13 10:07:52 UTC
  • Revision ID: james.westby@ubuntu.com-20020413100752-va9zm0rd4gpurdkq
Tags: upstream-3.2.1ln
ImportĀ upstreamĀ versionĀ 3.2.1ln

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
void ATL_USERMM
 
2
   (const int M, const int N, const int K, const double alpha, const double *A, const int lda0, const double *B, const int ldb0, const double beta, double *C, const int ldc)
 
3
{
 
4
   register double b0, b1, c0;
 
5
   const double *pA; 
 
6
   double *pC=C;
 
7
   register int i, j, k;
 
8
   #define lda KB
 
9
   #define ldb KB
 
10
 
 
11
   for (j=0; j != NB; j++)
 
12
   {
 
13
      pC = C;
 
14
      pA = A;
 
15
      for (k=0; k != KB; k += 2)
 
16
      {
 
17
         b0 = B[k];
 
18
         b1 = B[k+1];
 
19
         for (i=0; i != MB; i += 8)
 
20
         {
 
21
            pC[i] += pA[i*lda] * b0 + pA[i*lda+1] * b1;
 
22
            pC[i+1] += pA[(i+1)*lda] * b0 + pA[(i+1)*lda+1] * b1;
 
23
            pC[i+2] += pA[(i+2)*lda] * b0 + pA[(i+2)*lda+1] * b1;
 
24
            pC[i+3] += pA[(i+3)*lda] * b0 + pA[(i+3)*lda+1] * b1;
 
25
            pC[i+4] += pA[(i+4)*lda] * b0 + pA[(i+4)*lda+1] * b1;
 
26
            pC[i+5] += pA[(i+5)*lda] * b0 + pA[(i+5)*lda+1] * b1;
 
27
            pC[i+6] += pA[(i+6)*lda] * b0 + pA[(i+6)*lda+1] * b1;
 
28
            pC[i+7] += pA[(i+7)*lda] * b0 + pA[(i+7)*lda+1] * b1;
 
29
         }
 
30
         pC += ldc;
 
31
         pA += 2;
 
32
      }
 
33
      B += ldb;
 
34
   }
 
35
}