private int selectBlocksPerTaskDimJ ( int blockStripe , int iMax , int jMax , int kMax ) { int adjust = ( jMax % blockStripe > 0 ) ? 1 : 0 ; if ( jMax < ( 5 * blockStripe ) || jMax <= iMax ) { // do not break this dimension into parallel tasks return jMax / blockStripe + adjust ; } else { // assume 2 parallel tasks return Math . max ( 1 , ( jMax / blockStripe + adjust ) / 2 ) ; } // may need something if jMax >>> iMax }
- if set too large then may not fully exploit parallelism