mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-05-02 16:54:10 +08:00
Workaround a division by zero when outerstride==0
This commit is contained in:
parent
6f960b83ff
commit
42a3352a3b
@ -83,7 +83,7 @@ EIGEN_DONT_INLINE void triangular_solve_matrix<Scalar,Index,OnTheLeft,Mode,Conju
|
|||||||
// coherence when accessing the rhs elements
|
// coherence when accessing the rhs elements
|
||||||
std::ptrdiff_t l1, l2, l3;
|
std::ptrdiff_t l1, l2, l3;
|
||||||
manage_caching_sizes(GetAction, &l1, &l2, &l3);
|
manage_caching_sizes(GetAction, &l1, &l2, &l3);
|
||||||
Index subcols = cols>0 ? l2/(4 * sizeof(Scalar) * otherStride) : 0;
|
Index subcols = cols>0 ? l2/(4 * sizeof(Scalar) * std::max<Index>(otherStride,size)) : 0;
|
||||||
subcols = std::max<Index>((subcols/Traits::nr)*Traits::nr, Traits::nr);
|
subcols = std::max<Index>((subcols/Traits::nr)*Traits::nr, Traits::nr);
|
||||||
|
|
||||||
for(Index k2=IsLower ? 0 : size;
|
for(Index k2=IsLower ? 0 : size;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user