Merge pull request #6759 from haraldkl/ompi_aggregators-cost_calc_intfix
Suggestion to fix division by zero in file view.
Этот коммит содержится в:
Коммит
d621e3f0bb
@ -1491,13 +1491,12 @@ static double cost_calc (int P, int P_a, size_t d_p, size_t b_c, int dim )
|
|||||||
}
|
}
|
||||||
case DIM2:
|
case DIM2:
|
||||||
{
|
{
|
||||||
int P_x, P_y, c;
|
int P_x, P_y;
|
||||||
|
|
||||||
P_x = P_y = (int) sqrt(P);
|
P_x = P_y = (int) sqrt(P);
|
||||||
c = (float) P_a / (float)P_x;
|
n_as = (float) P_a / (float)P_x;
|
||||||
|
|
||||||
n_ar = (float) P_y;
|
n_ar = (float) P_y;
|
||||||
n_as = (float) c;
|
|
||||||
if ( d_p > (P_a*b_c/P )) {
|
if ( d_p > (P_a*b_c/P )) {
|
||||||
m_s = fmin(b_c / P_y, d_p);
|
m_s = fmin(b_c / P_y, d_p);
|
||||||
}
|
}
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user