take into account possible inf and nan
This commit is contained in:
@@ -1162,10 +1162,14 @@ accu(const SpGlue<T1,T2,spglue_schur>& expr)
|
||||
|
||||
if((x_it_col < y_it_col) || ((x_it_col == y_it_col) && (x_it_row < y_it_row))) // if y is closer to the end
|
||||
{
|
||||
acc += (*x_it) * eT(0); // in case (*x_it) is inf or nan
|
||||
|
||||
++x_it;
|
||||
}
|
||||
else // x is closer to the end
|
||||
{
|
||||
acc += eT(0) * (*y_it); // in case (*y_it) is inf or nan
|
||||
|
||||
++y_it;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user