SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ localsize() [2/2]

Int localsize ( Int  myprow,
Int  p,
Int  nbrow,
Int  m 
)

Definition at line 145 of file pgemraux.c.

146{
147 Int templateheight, blockheight;
148 templateheight = p * nbrow;
149 if (m % templateheight != 0) { /* not an exact boundary */
150 if ((m % templateheight) > (nbrow * myprow)) { /* processor
151 * (myprow,mypcol) has
152 * some elements in that
153 * incomplete template */
154 if ((m % templateheight) >= (nbrow * (myprow + 1))) { /* processor
155 * (myprow,mypcol)'s
156 * part is complete */
157 blockheight = (m / templateheight) * nbrow + nbrow;
158 } else { /* processor (myprow,mypcol)'s part is not complete */
159 blockheight = (m / templateheight) * nbrow + (m % nbrow);
160 }; /* if ((m%templateheight) > (nbrow*(myprow+1))) */
161 } else { /* processor (myprow,mypcol) has no element in that
162 * incomplete template */
163 blockheight = (m / templateheight) * nbrow;
164 }; /* if ((m%templateheight) > (nbrow*myprow)) */
165 } else { /* exact boundary */
166 blockheight = m / p; /* (m/templateheight) * nbrow */
167 }; /* if (m%templateheight !=0) */
168 return blockheight;
169}
#define Int
Definition Bconfig.h:22