cblas_stpmv.c
Go to the documentation of this file.
00001 /*
00002  *
00003  * cblas_stpmv.c
00004  * This program is a C interface to stpmv.
00005  * Written by Keita Teranishi
00006  * 4/6/1998
00007  *
00008  */
00009 #include "cblas.h"
00010 #include "cblas_f77.h"
00011 void cblas_stpmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00012                  const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
00013                  const int N, const float  *Ap, float  *X, const int incX)
00014 {
00015    char TA;
00016    char UL;
00017    char DI;
00018 #ifdef F77_CHAR
00019    F77_CHAR F77_TA, F77_UL, F77_DI;
00020 #else
00021    #define F77_TA &TA
00022    #define F77_UL &UL
00023    #define F77_DI &DI   
00024 #endif
00025 #ifdef F77_INT
00026    F77_INT F77_N=N, F77_incX=incX;
00027 #else
00028    #define F77_N N
00029    #define F77_incX incX
00030 #endif
00031    extern int CBLAS_CallFromC;
00032    extern int RowMajorStrg;
00033    RowMajorStrg = 0;
00034 
00035    CBLAS_CallFromC = 1;
00036    if (order == CblasColMajor)
00037    {
00038       if (Uplo == CblasUpper) UL = 'U';
00039       else if (Uplo == CblasLower) UL = 'L';
00040       else 
00041       {
00042          cblas_xerbla(2, "cblas_stpmv","Illegal Uplo setting, %d\n", Uplo);
00043          CBLAS_CallFromC = 0;
00044          RowMajorStrg = 0;
00045          return;
00046       }
00047       if (TransA == CblasNoTrans) TA = 'N';
00048       else if (TransA == CblasTrans) TA = 'T';
00049       else if (TransA == CblasConjTrans) TA = 'C';
00050       else 
00051       {
00052          cblas_xerbla(3, "cblas_stpmv","Illegal TransA setting, %d\n", TransA);
00053          CBLAS_CallFromC = 0;
00054          RowMajorStrg = 0;
00055          return;
00056       }
00057       if (Diag == CblasUnit) DI = 'U';
00058       else if (Diag == CblasNonUnit) DI = 'N';
00059       else 
00060       {
00061          cblas_xerbla(4, "cblas_stpmv","Illegal Diag setting, %d\n", Diag);
00062          CBLAS_CallFromC = 0;
00063          RowMajorStrg = 0;
00064          return;
00065       }
00066       #ifdef F77_CHAR
00067          F77_UL = C2F_CHAR(&UL);
00068          F77_TA = C2F_CHAR(&TA);
00069          F77_DI = C2F_CHAR(&DI);
00070       #endif
00071       F77_stpmv( F77_UL, F77_TA, F77_DI, &F77_N, Ap, X, &F77_incX);
00072    }
00073    else if (order == CblasRowMajor)
00074    {
00075       RowMajorStrg = 1;
00076       if (Uplo == CblasUpper) UL = 'L';
00077       else if (Uplo == CblasLower) UL = 'U';
00078       else 
00079       {
00080          cblas_xerbla(2, "cblas_stpmv","Illegal Uplo setting, %d\n", Uplo);
00081          CBLAS_CallFromC = 0;
00082          RowMajorStrg = 0;
00083          return;
00084       }
00085 
00086       if (TransA == CblasNoTrans) TA = 'T';
00087       else if (TransA == CblasTrans) TA = 'N';
00088       else if (TransA == CblasConjTrans) TA = 'N';
00089       else 
00090       {
00091          cblas_xerbla(3, "cblas_stpmv","Illegal TransA setting, %d\n", TransA);
00092          CBLAS_CallFromC = 0;
00093          RowMajorStrg = 0;
00094          return;
00095       }
00096 
00097       if (Diag == CblasUnit) DI = 'U';
00098       else if (Diag == CblasNonUnit) DI = 'N';
00099       else 
00100       {
00101          cblas_xerbla(4, "cblas_stpmv","Illegal Diag setting, %d\n", Diag);
00102          CBLAS_CallFromC = 0;
00103          RowMajorStrg = 0;
00104          return;
00105       }
00106       #ifdef F77_CHAR
00107          F77_UL = C2F_CHAR(&UL);
00108          F77_TA = C2F_CHAR(&TA);
00109          F77_DI = C2F_CHAR(&DI);
00110       #endif
00111 
00112       F77_stpmv( F77_UL, F77_TA, F77_DI, &F77_N, Ap, X,&F77_incX);
00113    }
00114    else cblas_xerbla(1, "cblas_stpmv", "Illegal Order setting, %d\n", order);
00115    CBLAS_CallFromC = 0;
00116    RowMajorStrg = 0;
00117    return;
00118 }


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