Commits

Anonymous committed a0580cf

tuned OpenMP parameters for M4RI on sage.math

Comments (0)

Files changed (1)

src/brilliantrussian.c

   const int kb = k-k/2;
 
 #ifdef HAVE_OPENMP
-#pragma omp parallel for private(r) shared(startrow, stoprow) schedule(dynamic,32) if(stoprow-startrow > 128)
+#pragma omp parallel for private(r) shared(startrow, stoprow) schedule(static,512) //MAX((CPU_L1_CACHE>>3)/wide,
 #endif
   for(r=startrow; r<stoprow; r++) {
     const int x0 = L0[ (int)mzd_read_bits(M, r, startcol, ka)];
   const int kc = k/3;
 
 #ifdef HAVE_OPENMP
-#pragma omp parallel for private(r) shared(startrow, stoprow) schedule(dynamic,32) if(stoprow-startrow > 128)
+#pragma omp parallel for private(r) shared(startrow, stoprow) schedule(static,512) //if(stoprow-startrow > 128)
 #endif
   for(r=startrow; r<stoprow; r++) {
     const int x0 = L0[ (int)mzd_read_bits(M, r, startcol, ka)];
   const int kd = k/4;
 
 #ifdef HAVE_OPENMP
-#pragma omp parallel for private(r) shared(startrow, stoprow) schedule(dynamic,32) if(stoprow-startrow > 128)
+#pragma omp parallel for private(r) shared(startrow, stoprow) schedule(static,512) //if(stoprow-startrow > 128)
 #endif
   for(r=startrow; r<stoprow; r++) {
     const int x0 = L0[ (int)mzd_read_bits(M, r, startcol, ka)];
   const int ke = k/5;
 
 #ifdef HAVE_OPENMP
-#pragma omp parallel for private(r) shared(startrow, stoprow) schedule(dynamic,32) if(stoprow-startrow > 128)
+#pragma omp parallel for private(r) shared(startrow, stoprow) schedule(static,512) //if(stoprow-startrow > 128)
 #endif
   for(r=startrow; r<stoprow; r++) {
     
   const int kf = k/6;
 
 #ifdef HAVE_OPENMP
-#pragma omp parallel for private(r) shared(startrow, stoprow) schedule(dynamic,32) if(stoprow-startrow > 128)
+#pragma omp parallel for private(r) shared(startrow, stoprow) schedule(static,512) //if(stoprow-startrow > 128)
 #endif
   for(r=startrow; r<stoprow; r++) {
     const int x0 = L0[ (int)mzd_read_bits(M, r, startcol, ka)];