?lasrt

Sorts numbers in increasing or decreasing order.

Syntax

call slasrt( id, n, d, info )

call dlasrt( id, n, d, info )

Include Files

The FORTRAN 77 interfaces are specified in the mkl_lapack.fi include file (to be used in Fortran programs) and in the mkl_lapack.h include file (to be used in C programs).

Description

The routine ?lasrt sorts the numbers in d in increasing order (if id = 'I') or in decreasing order (if id = 'D'). It uses Quick Sort, reverting to Insertion Sort on arrays of size ≤ 20. Dimension of stack limits n to about 232.

Input Parameters

id

CHARACTER*1.

= 'I': sort d in increasing order;

= 'D': sort d in decreasing order.

n

INTEGER. The length of the array d.

d

REAL for slasrt

DOUBLE PRECISION for dlasrt.

On entry, the array to be sorted.

Output Parameters

d

On exit, d has been sorted into increasing order

(d(1) ≤ ... ≤ d(n)) or into decreasing order

(d(1) ... d(n)), depending on id.

info

INTEGER.

= 0: successful exit

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


Submit feedback on this help topic

Copyright © 1994 - 2011, Intel Corporation. All rights reserved.