Developer Reference

  • 2020.2
  • 07/15/2020
  • Public Content
Contents

p?lasrt

Sorts the numbers in an array and the corresponding vectors in increasing order.

Syntax

call pslasrt
(
id
,
n
,
d
,
q
,
iq
,
jq
,
descq
,
work
,
lwork
,
iwork
,
liwork
,
info
)
call pdlasrt
(
id
,
n
,
d
,
q
,
iq
,
jq
,
descq
,
work
,
lwork
,
iwork
,
liwork
,
info
)
Description
p?lasrt
sorts the numbers in
d
and the corresponding vectors in
q
in increasing order.
Input Parameters
id
(global)
CHARACTER*1.
= 'I': sort
d
in increasing order;
= 'D': sort
d
in decreasing order. (NOT IMPLEMENTED YET)
n
(global)
INTEGER.
The number of columns to be operated on i.e the number of columns of the distributed submatrix sub(
Q
).
n
>= 0.
d
(global)
REAL
for
pslasrt
DOUBLE PRECISION
for
pdlasrt
Array, size (
n
)
q
(local)
REAL
for
pslasrt
DOUBLE PRECISION
for
pdlasrt
Pointer into the local memory to an array of size
(
lld_q
,
LOCc
(
jq
+
n
-1))
.
This array contains the local pieces of the distributed matrix sub(
A
) to be copied from.
iq
(global)
INTEGER.
The row index in the global array A indicating the first row of sub(
Q
).
jq
(global)
INTEGER.
The column index in the global array A indicating the first column of sub(
Q
).
descq
(global and local)
INTEGER.
Array of size
dlen_
.
The array descriptor for the distributed matrix
A
.
work
(local)
REAL
for
pslasrt
DOUBLE PRECISION
for
pdlasrt
Array, size (
lwork
)
lwork
(local)
INTEGER.
The size of the array
work
.
lwork
= MAX(
n
, NP * ( NB + NQ )), where NP =
numroc
(
n
, NB, MYROW, IAROW, NPROW ), NQ =
numroc
(
n
, NB, MYCOL, DESCQ(
csrc_
), NPCOL ).
numroc
is a ScaLAPACK tool function.
iwork
(local)
INTEGER.
Array, size (
liwork
)
liwork
(local)
INTEGER.
The size of the array
iwork
.
liwork
=
n
+ 2*NB + 2*NPCOL
Output Parameters
d
On exit, the numbers in
d
are sorted in increasing order.
info
(global)
INTEGER.
= 0: successful exit
< 0: If the
i
-th argument is an array and the
j
-th entry had an illegal value, then
info
= -(
i
*100+
j
), if the
i
-th argument is a scalar and had an illegal value, then
info
= -
i
.