LJ Archive

Listing 6.

void matmul1(int dim, float *a, float *b,
   float *c)
   {
      int i, j, k; float dot;

      /* transpose b: */
      for (i = 0; i < dim; ++i)
      for (j = 0; j < dim; ++j)
         tb[i*dim + j] = b[j*dim + i];

/* ...rest like matmul0, except that b is replaced
   by tb... */
   }
LJ Archive