slasrt2/dlasrt2 always use insertion sort
slasrt2/dlasrt2
line 110 as referenced in
http://www.netlib.org/scalapack/explore-html/d6/da6/dlasrt2_8f_source.html
http://www.netlib.org/scalapack/explore-html/d9/d96/slasrt2_8f_source.html
is
which is almost always true.
It should be
(same as line 105 of dlapst.f) so that insertion sort is only performed for small arrays.
line 110 as referenced in
http://www.netlib.org/scalapack/explore-html/d6/da6/dlasrt2_8f_source.html
http://www.netlib.org/scalapack/explore-html/d9/d96/slasrt2_8f_source.html
is
- Code: Select all
IF( ENDD-START.GT.0 ) THEN
which is almost always true.
It should be
- Code: Select all
IF( ENDD-START.LE.SELECT .AND. ENDD-START.GT.0 ) THEN
(same as line 105 of dlapst.f) so that insertion sort is only performed for small arrays.