blas_ipermute - permutes an integer array in terms of the permutation vector P, output by dsortv
SUBROUTINE BLAS_IPERMUTE( N, P, INCP, X, INCX) INTEGER N, INCP, INCX INTEGER P(*), X(*)
SUBROUTINE BLAS_IPERMUTE_64( N, P, INCP, X, INCX) INTEGER*8 N, INCP, INCX INTEGER*8 P(*), X(*)
SUBROUTINE PERMUTE( [N], P, [INCP], X, [INCX]) INTEGER :: N, INCP, INCX INTEGER, DIMENSION(:) :: P, X
SUBROUTINE PERMUTE_64( [N], P, [INCP], X, [INCX]) INTEGER(8) :: N, INCP, INCX INTEGER(8), DIMENSION(:) :: P, X
#include <sunperf.h>
void blas_ipermute(int n, int *p, int incp, int *x, int incx);
void blas_ipermute_64(long n, long *p, long incp, long *x, long incx);
If INCP > 0,
if INCX > 0,
sorted X((i-1)*INCX+1) = X(P((i-1)*INCP+1)),
if INCX < 0,
sorted X((N-i)*|INCX|+1) = X(P((i-1)*INCP+1));
If INCP < 0,
if INCX > 0,
sorted X((i-1)*INCX+1) = X(P((N-i)*|INCP|+1)).
if INCX < 0,
sorted X((N-i)*|INCX|+1)
= X(P((N-i)*|INCP|+1)).
blas_isortv(3P), blas_isort(3P)