[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Alignment of cleanup routines



Another update to the emit_mm.c patch:

--- ATLAS/tune/blas/gemm/emit_mm.c	Fri Nov 17 23:53:26 2000
+++ atlas-3.1.4D/tune/blas/gemm/emit_mm.c	Mon Nov 27 14:29:30 2000
@@ -2684,10 +2684,10 @@
    if (cp0->fixed == 1)
    {
       NBs[0] = cp0->imult;
-      istop = cp->nb;
+      istop = cp0->nb;
       while (istop % cp0->imult) istop--;
-      if (istop == cp->nb) istop -= cp0->imult;
-      for (cp=cp0->next; cp; cp->next)
+      if (istop == cp0->nb) istop -= cp0->imult;
+      for (cp=cp0->next; cp; cp=cp->next)
       {
          if (cp->imult % cp0->imult == 0 && cp->fixed != 2)
          {
@@ -2701,7 +2701,7 @@
          if (!CompMultHandled(cp0->next, i)) NBs[n++] = i;
       }
    }
-   else if (cp0->fixed) NBs[0] = cp->imult;
+   else if (cp0->fixed) NBs[0] = cp0->imult;
    else NBs[0] = 0;
 
    ip = malloc(n * sizeof(int));
@@ -3077,7 +3077,7 @@
    assert(fp);
    PrintUHeaders(tolower(pre), fp, cp0, cw, cbeta, 1);
    if (which == CleanK && cbeta == '1')
-      fprintf(fp, "#include \"%cmm.h\"\n", pre);
+      fprintf(fp, "#include \"%cmm.h\"\n", tolower(pre));
    fprintf(fp, "\n");
 
    fprintf(fp, 
@@ -3103,8 +3103,9 @@
       fprintf(fp, "      %s,\n", funcp[i]);
       free(funcp[i]);
    }
-   free(funcp);
    fprintf(fp, "      %s\n   };\n\n", funcp[nb-1]);
+   free(funcp[nb-1]);
+   free(funcp);
 
    fprintf(fp, "   mmfunc[%c]%s;\n", cw, MMARGS);
 

Take care,
-- 
Camm Maguire			     			camm@enhanced.com
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah