Developer Reference

  • 0.9
  • 09/09/2020
  • Public Content
Contents

?lasrt2

Sorts numbers in increasing or decreasing order.

Syntax

void
slasrt2
(
char
*id
,
MKL_INT
*n
,
float
*d
,
MKL_INT
*key
,
MKL_INT
*info
);
void
dlasrt2
(
char
*id
,
MKL_INT
*n
,
double
*d
,
MKL_INT
*key
,
MKL_INT
*info
);
Include Files
  • mkl_scalapack.h
Description
The
?lasrt2
function
is modified LAPACK
function
?lasrt
, which 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. The size of
STACK
limits
n
to about 2
32
.
Input Parameters
id
=
'I'
: sort
d
in increasing order;
=
'D'
: sort
d
in decreasing order.
n
The length of the array
d
.
d
Array of size
n
.
On entry, the array to be sorted.
key
Array of size
n
.
On entry,
key
contains a key to each of the entries in
d
.
Typically,
key
[
i
]=
i
+1 for all
i
= 0, ...,
n
-1
.
Output Parameters
d
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
.
info
= 0
: successful exit
< 0
: if
info
= -i
, the
i
-th argument had an illegal value.
key
On exit,
key
is permuted in exactly the same manner as
d
was permuted from input to output. Therefore, if
key
[
i
] =
i
+1 for all
i
=0, ..., n-1
on input,
d
[
i
] on output equals
d
[
key
[
i
]-1] on input
.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804