Update of /cvsroot/math-atlas/AtlasBase/Clint
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv7958/Clint
Modified Files:
atlas.base
Log Message:
Index: atlas.base
===================================================================
RCS file: /cvsroot/math-atlas/AtlasBase/Clint/atlas.base,v
retrieving revision 1.90
retrieving revision 1.91
diff -C2 -d -r1.90 -r1.91
*** atlas.base 1 Feb 2007 17:49:32 -0000 1.90
--- atlas.base 2 Feb 2007 00:22:40 -0000 1.91
***************
*** 10471,10475 ****
--- 10471,10488 ----
char as[8], bs[8], ixs[8], iys[8];
+ @ROUT emitmv emit_lvl1 genmv emit_mmN
+ void PrintC99Defines(FILE *fpout, char *spc)
+ {
+ fprintf(fpout, "%s#ifndef ATL_RESTRICT\n", spc);
+ fprintf(fpout,
+ "%s#if defined(__STDC_VERSION__) && (__STDC_VERSION__/100 >= 1999)\n",
+ spc);
+ fprintf(fpout, "%s #define ATL_RESTRICT restrict\n", spc);
+ fprintf(fpout, "%s#else\n%s #define ATL_RESTRICT\n%s#endif\n",
+ spc, spc, spc);
+ fprintf(fpout, "%s#endif\n", spc);
+ }
@ROUT emitmv printtypehead emit_lvl1 genmv emit_mmN
+
int GetPower2(int n)
{
***************
*** 12011,12015 ****
char *loopstr, enum ATLAS_TRANS TA, enum ATLAS_TRANS TB,
int M, int N, int K, int mu, int nu, int ku,
! int alpha, int beta, int lda, int ldb, int ldc)
{
char cTA='N', cTB='N';
--- 12024,12028 ----
char *loopstr, enum ATLAS_TRANS TA, enum ATLAS_TRANS TB,
int M, int N, int K, int mu, int nu, int ku,
! int alpha, int beta, int lda, int ldb, int ldc, int pfA)
{
char cTA='N', cTB='N';
***************
*** 12042,12058 ****
if ( (alpha != 1 && alpha != -1) || RegCallSeq)
fprintf(fpout, "const %s alpha, ", type);
! fprintf(fpout, "const %s *A, ", type);
if (!lda || RegCallSeq) fprintf(fpout, "const int lda, ");
! fprintf(fpout, "const %s *B, ", type);
if (!ldb || RegCallSeq) fprintf(fpout, "const int ldb, ");
if (beta != 1 && beta != -1 && beta != 0 || RegCallSeq)
fprintf(fpout, "const %s beta, ", type);
! fprintf(fpout, "%s *C", type);
if (!ldc || RegCallSeq) fprintf(fpout, ", const int ldc");
fprintf(fpout, ")\n");
fprintf(fpout, "/*\n * matmul with TA=%c, TB=%c, MB=%d, NB=%d, KB=%d, \n",
cTA, cTB, M, N, K);
! fprintf(fpout, " * lda=%d, ldb=%d, ldc=%d, mu=%d, nu=%d, ku=%d\n",
! lda, ldb, ldc, mu, nu, ku);
fprintf(fpout, " */\n");
}
--- 12055,12072 ----
if ( (alpha != 1 && alpha != -1) || RegCallSeq)
fprintf(fpout, "const %s alpha, ", type);
! fprintf(fpout, "const %s * ATL_RESTRICT A, ", type);
if (!lda || RegCallSeq) fprintf(fpout, "const int lda, ");
! fprintf(fpout, "const %s * ATL_RESTRICT B, ", type);
if (!ldb || RegCallSeq) fprintf(fpout, "const int ldb, ");
if (beta != 1 && beta != -1 && beta != 0 || RegCallSeq)
fprintf(fpout, "const %s beta, ", type);
! fprintf(fpout, "%s * ATL_RESTRICT C", type);
if (!ldc || RegCallSeq) fprintf(fpout, ", const int ldc");
fprintf(fpout, ")\n");
fprintf(fpout, "/*\n * matmul with TA=%c, TB=%c, MB=%d, NB=%d, KB=%d, \n",
cTA, cTB, M, N, K);
! fprintf(fpout, " * lda=%d, ldb=%d, ldc=%d, mu=%d, nu=%d, ku=%d, pf=%d\n",
! lda, ldb, ldc, mu, nu, ku, pfA);
! fprintf(fpout, " * Generated by ATLAS/tune/blas/gemm/emit_mm.c (@(ver))\n");
fprintf(fpout, " */\n");
}
***************
*** 12191,12194 ****
--- 12205,12209 ----
else kloop = regKloop;
+ PrintC99Defines(fpout, "");
if (prefA1 || prefA2)
fprintf(fpout, "#include \"atlas_prefetch.h\"\n\n");
***************
*** 12266,12270 ****
*/
MMDeclare(fpout, spc, pre, type, decmod, lstr[LoopOrder], TA, TB, M, N, K,
! mu, nu, ku, alpha, beta, lda, ldb, ldc);
fprintf(fpout, "{\n");
--- 12281,12285 ----
*/
MMDeclare(fpout, spc, pre, type, decmod, lstr[LoopOrder], TA, TB, M, N, K,
! mu, nu, ku, alpha, beta, lda, ldb, ldc, prefA);
fprintf(fpout, "{\n");
***************
*** 16726,16737 ****
/*
! * Define RESTRICT macro, so we can assert BLAS-style aliasing rules when the
! * language supports it
*/
#if defined(__STDC_VERSION__) && (__STDC_VERSION__/100 >= 1999)
! #define RESTRICT restrict
! #elif defined(__GNUC__) && (__GNUC__ >= 3)
#define RESTRICT restrict
#else
#define RESTRICT
#endif
--- 16741,16751 ----
/*
! * Define some C99 features that we use when we know the compiler supports them
*/
#if defined(__STDC_VERSION__) && (__STDC_VERSION__/100 >= 1999)
! #define INLINE inline
#define RESTRICT restrict
#else
+ #define INLINE
#define RESTRICT
#endif
|