cblas_sspmv.c
Go to the documentation of this file.
00001 /*
00002  *
00003  * cblas_sspmv.c
00004  * This program is a C interface to sspmv.
00005  * Written by Keita Teranishi
00006  * 4/6/1998
00007  *
00008  */
00009 #include "cblas.h"
00010 #include "cblas_f77.h"
00011 void cblas_sspmv(const enum CBLAS_ORDER order,
00012                  const enum CBLAS_UPLO Uplo, const int N,
00013                  const float alpha, const float  *AP,
00014                  const float  *X, const int incX, const float beta,
00015                  float  *Y, const int incY)
00016 {
00017    char UL;
00018 #ifdef F77_CHAR
00019    F77_CHAR F77_UL;
00020 #else
00021    #define F77_UL &UL   
00022 #endif
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    extern int CBLAS_CallFromC;
00031    extern int RowMajorStrg;
00032    RowMajorStrg = 0;
00033 
00034    CBLAS_CallFromC = 1;
00035    if (order == CblasColMajor)
00036    {
00037       if (Uplo == CblasUpper) UL = 'U';
00038       else if (Uplo == CblasLower) UL = 'L';
00039       else 
00040       {
00041          cblas_xerbla(2, "cblas_sspmv","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       F77_sspmv(F77_UL, &F77_N, &alpha, AP, X,  
00050                      &F77_incX, &beta, Y, &F77_incY);
00051    }
00052    else if (order == CblasRowMajor)
00053    {
00054       RowMajorStrg = 1;
00055       if (Uplo == CblasUpper) UL = 'L';
00056       else if (Uplo == CblasLower) UL = 'U';
00057       else 
00058       {
00059          cblas_xerbla(2, "cblas_sspmv","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_sspmv(F77_UL, &F77_N, &alpha, 
00068                      AP, X,&F77_incX, &beta, Y, &F77_incY);
00069    }
00070    else cblas_xerbla(1, "cblas_sspmv", "Illegal Order setting, %d\n", order);
00071    CBLAS_CallFromC = 0;
00072    RowMajorStrg = 0;
00073 }


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