lasrt#

Functions

void slasrt(
    const char*          id,
    const INT            n,
          f32*  restrict D,
          INT*           info
);
void slasrt(const char *id, const INT n, f32 *restrict D, INT *info)#

Sort the numbers in D in increasing order (if ID = ‘I’) or in decreasing order (if ID = ‘D’).

Uses Quick Sort, reverting to Insertion sort on arrays of size <= 20. Dimension of STACK limits N to about 2**32.

Parameters

in
id

= ‘I’: sort D in increasing order; = ‘D’: sort D in decreasing order.

in
n

The length of the array D.

inout
D

Double precision array, dimension (n). On entry, the array to be sorted. On exit, D has been sorted into increasing order (D[0] <= … <= D[n-1]) or into decreasing order (D[0] >= … >= D[n-1]), depending on ID.

out
info

  • = 0: successful exit

  • < 0: if info = -i, the i-th argument had an illegal value

Functions

void dlasrt(
    const char*          id,
    const INT            n,
          f64*  restrict D,
          INT*           info
);
void dlasrt(const char *id, const INT n, f64 *restrict D, INT *info)#

Sort the numbers in D in increasing order (if ID = ‘I’) or in decreasing order (if ID = ‘D’).

Uses Quick Sort, reverting to Insertion sort on arrays of size <= 20. Dimension of STACK limits N to about 2**32.

Parameters

in
id

= ‘I’: sort D in increasing order; = ‘D’: sort D in decreasing order.

in
n

The length of the array D.

inout
D

Double precision array, dimension (n). On entry, the array to be sorted. On exit, D has been sorted into increasing order (D[0] <= … <= D[n-1]) or into decreasing order (D[0] >= … >= D[n-1]), depending on ID.

out
info

  • = 0: successful exit

  • < 0: if info = -i, the i-th argument had an illegal value