cblas_sspr2.c
Go to the documentation of this file.
00001 /*
00002  *
00003  * cblas_sspr2.c
00004  * This program is a C interface to sspr2.
00005  * Written by Keita Teranishi
00006  * 4/6/1998
00007  *
00008  */
00009 
00010 #include "cblas.h"
00011 #include "cblas_f77.h"
00012 void cblas_sspr2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00013                 const int N, const float  alpha, const float  *X,
00014                 const int incX, const float  *Y, const int incY, float  *A)
00015 {
00016    char UL;
00017 #ifdef F77_CHAR
00018    F77_CHAR F77_UL;
00019 #else
00020    #define F77_UL &UL
00021 #endif
00022 
00023 #ifdef F77_INT
00024    F77_INT F77_N=N, F77_incX=incX, F77_incY=incY;
00025 #else
00026    #define F77_N N
00027    #define F77_incX incX
00028    #define F77_incY incY
00029 #endif
00030 
00031    extern int CBLAS_CallFromC;
00032    extern int RowMajorStrg;
00033    RowMajorStrg = 0;
00034    CBLAS_CallFromC = 1;
00035    if (order == CblasColMajor)
00036    {
00037       if (Uplo == CblasLower) UL = 'L';
00038       else if (Uplo == CblasUpper) UL = 'U';
00039       else 
00040       {
00041          cblas_xerbla(2, "cblas_sspr2","Illegal Uplo setting, %d\n",Uplo );
00042          CBLAS_CallFromC = 0;
00043          RowMajorStrg = 0;
00044          return;
00045       }
00046       #ifdef F77_CHAR
00047          F77_UL = C2F_CHAR(&UL);
00048       #endif
00049 
00050       F77_sspr2(F77_UL, &F77_N, &alpha, X, &F77_incX, Y, &F77_incY, A);
00051 
00052    }  else if (order == CblasRowMajor) 
00053    {
00054       RowMajorStrg = 1;
00055       if (Uplo == CblasLower) UL = 'U';
00056       else if (Uplo == CblasUpper) UL = 'L';
00057       else 
00058       {
00059          cblas_xerbla(2, "cblas_sspr2","Illegal Uplo setting, %d\n",Uplo );
00060          CBLAS_CallFromC = 0;
00061          RowMajorStrg = 0;
00062          return;
00063       }
00064       #ifdef F77_CHAR
00065          F77_UL = C2F_CHAR(&UL);
00066       #endif  
00067       F77_sspr2(F77_UL, &F77_N, &alpha, X, &F77_incX, Y, &F77_incY,  A); 
00068    } else cblas_xerbla(1, "cblas_sspr2", "Illegal Order setting, %d\n", order);
00069    CBLAS_CallFromC = 0;
00070    RowMajorStrg = 0;
00071 }


swiftnav
Author(s):
autogenerated on Sat Jun 8 2019 18:55:16