summaryrefslogtreecommitdiff
path: root/CBLAS/src/cblas_zhpr2.c
diff options
context:
space:
mode:
Diffstat (limited to 'CBLAS/src/cblas_zhpr2.c')
-rw-r--r--CBLAS/src/cblas_zhpr2.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/CBLAS/src/cblas_zhpr2.c b/CBLAS/src/cblas_zhpr2.c
index a4349d3e..b7c6ca51 100644
--- a/CBLAS/src/cblas_zhpr2.c
+++ b/CBLAS/src/cblas_zhpr2.c
@@ -1,7 +1,7 @@
/*
* cblas_zhpr2.c
* The program is a C interface to zhpr2.
- *
+ *
* Keita Teranishi 5/20/98
*
*/
@@ -10,7 +10,7 @@
#include "cblas.h"
#include "cblas_f77.h"
void cblas_zhpr2(const CBLAS_LAYOUT layout, const CBLAS_UPLO Uplo,
- const int N,const void *alpha, const void *X,
+ const int N,const void *alpha, const void *X,
const int incX,const void *Y, const int incY, void *Ap)
{
@@ -35,13 +35,13 @@ void cblas_zhpr2(const CBLAS_LAYOUT layout, const CBLAS_UPLO Uplo,
extern int CBLAS_CallFromC;
extern int RowMajorStrg;
RowMajorStrg = 0;
-
+
CBLAS_CallFromC = 1;
if (layout == CblasColMajor)
{
if (Uplo == CblasLower) UL = 'L';
else if (Uplo == CblasUpper) UL = 'U';
- else
+ else
{
cblas_xerbla(2, "cblas_zhpr2","Illegal Uplo setting, %d\n",Uplo );
CBLAS_CallFromC = 0;
@@ -59,7 +59,7 @@ void cblas_zhpr2(const CBLAS_LAYOUT layout, const CBLAS_UPLO Uplo,
RowMajorStrg = 1;
if (Uplo == CblasUpper) UL = 'L';
else if (Uplo == CblasLower) UL = 'U';
- else
+ else
{
cblas_xerbla(2, "cblas_zhpr2","Illegal Uplo setting, %d\n", Uplo);
CBLAS_CallFromC = 0;
@@ -73,14 +73,14 @@ void cblas_zhpr2(const CBLAS_LAYOUT layout, const CBLAS_UPLO Uplo,
{
n = N << 1;
x = malloc(n*sizeof(double));
- y = malloc(n*sizeof(double));
+ y = malloc(n*sizeof(double));
stx = x + n;
sty = y + n;
if( incX > 0 )
i = incX << 1;
else
i = incX *(-2);
-
+
if( incY > 0 )
j = incY << 1;
else
@@ -108,32 +108,32 @@ void cblas_zhpr2(const CBLAS_LAYOUT layout, const CBLAS_UPLO Uplo,
F77_incX = 1;
else
F77_incX = -1;
-
+
if(incY > 0 )
F77_incY = 1;
else
F77_incY = -1;
-
+
#else
if(incX > 0 )
incx = 1;
else
incx = -1;
-
+
if(incY > 0 )
incy = 1;
else
incy = -1;
#endif
- } else
+ } else
{
x = (double *) X;
y = (void *) Y;
}
F77_zhpr2(F77_UL, &F77_N, alpha, y, &F77_incY, x, &F77_incX, Ap);
- }
- else
+ }
+ else
{
cblas_xerbla(1, "cblas_zhpr2","Illegal layout setting, %d\n", layout);
CBLAS_CallFromC = 0;