blas_spermute - permutes a real array in terms of the permutation vector P, output by dsortv
SUBROUTINE BLAS_SPERMUTE( N, P, INCP, X, INCX) INTEGER N, INCP, INCX INTEGER P(*) REAL X(*)
SUBROUTINE BLAS_SPERMUTE_64( N, P, INCP, X, INCX) INTEGER*8 N, INCP, INCX INTEGER*8 P(*) REAL X(*)
SUBROUTINE PERMUTE( [N], P, [INCP], X, [INCX]) INTEGER :: N, INCP, INCX INTEGER, DIMENSION(:) :: P REAL, DIMENSION(:) :: X
SUBROUTINE PERMUTE_64( [N], P, [INCP], X, [INCX]) INTEGER(8) :: N, INCP, INCX INTEGER(8), DIMENSION(:) :: P REAL, DIMENSION(:) :: X
#include <sunperf.h>
void blas_spermute(int n, int *p, int incp, float *x, int incx);
void blas_spermute_64(long n, long *p, long incp, float *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_ssortv(3P), blas_ssort(3P)