1. CarloWood
  2. M4RI

Commits

Martin Albrecht  committed 3700e54

define CPU_L2_CACHE in misc.h if it isn't there already
revert strategy in elimination to good compromise across plattforms. 2x strategy is best on Opteron but not best on C2D

  • Participants
  • Parent commits e15a374
  • Branches default

Comments (0)

Files changed (3)

File src/brilliantrussian.c

View file
       k = 7;
     if ( (6*(1<<k)*A->ncols / 8.0) > CPU_L2_CACHE / 2.0 )
       k -= 1;
-    if ( (6*(1<<k)*A->ncols / 8.0) > CPU_L2_CACHE / 2.0 )
-      k -= 1;
   }
   /*printf("k: %d\n",k);*/
   int kk = 6*k;

File src/misc.h

View file
 
 /***** Memory Management *****/
 
+#ifndef CPU_L2_CACHE
+/**
+ * Fix some standard value for L2 cache size if it couldn't be
+ * determined by configure.
+ */
+#define CPU_L2_CACHE 524288
+#endif //CPU_L2_CACHE
+
 /**
  * \brief Calloc wrapper.
  *
  * Maximal size of blocks stored in cache.
  */
 
-#ifdef CPU_L2_CACHE
 #define M4RI_MMC_THRESHOLD CPU_L2_CACHE
-#else
-#define M4RI_MMC_THRESHOLD 1024*1024
-#endif
 
 /**
  * The mmc memory management functions check a cache for re-usable

File src/strassen.h

View file
  */
 
 #ifndef STRASSEN_MUL_CUTOFF
-#ifndef CPU_L2_CACHE
-#define CPU_L2_CACHE 524288
-#endif //CPU_L2_CACHE
-
 #define STRASSEN_MUL_CUTOFF ((int)sqrt((double)(4*CPU_L2_CACHE)))
 #endif// STRASSEN_MUL_CUTOFF