cblas_dgbmv.c
Go to the documentation of this file.
00001 /*
00002  *
00003  * cblas_dgbmv.c
00004  * This program is a C interface to dgbmv.
00005  * Written by Keita Teranishi
00006  * 4/6/1998
00007  *
00008  */
00009 #include "cblas.h"
00010 #include "cblas_f77.h"
00011 void cblas_dgbmv(const enum CBLAS_ORDER order,
00012                  const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
00013                  const int KL, const int KU,
00014                  const double alpha, const double  *A, const int lda,
00015                  const double  *X, const int incX, const double beta,
00016                  double  *Y, const int incY)
00017 {
00018    char TA;
00019 #ifdef F77_CHAR
00020    F77_CHAR F77_TA;
00021 #else
00022    #define F77_TA &TA   
00023 #endif
00024 #ifdef F77_INT
00025    F77_INT F77_M=M, F77_N=N, F77_lda=lda, F77_incX=incX, F77_incY=incY;
00026    F77_INT F77_KL=KL,F77_KU=KU;
00027 #else
00028    #define F77_M M
00029    #define F77_N N
00030    #define F77_lda lda
00031    #define F77_KL KL
00032    #define F77_KU KU
00033    #define F77_incX incX
00034    #define F77_incY incY
00035 #endif
00036    extern int CBLAS_CallFromC;
00037    extern int RowMajorStrg;
00038    RowMajorStrg = 0;
00039 
00040    CBLAS_CallFromC = 1;
00041    if (order == CblasColMajor)
00042    {
00043       if (TransA == CblasNoTrans) TA = 'N';
00044       else if (TransA == CblasTrans) TA = 'T';
00045       else if (TransA == CblasConjTrans) TA = 'C';
00046       else 
00047       {
00048          cblas_xerbla(2, "cblas_dgbmv","Illegal TransA setting, %d\n", TransA);
00049          CBLAS_CallFromC = 0;
00050          RowMajorStrg = 0;
00051          return;
00052       }
00053       #ifdef F77_CHAR
00054          F77_TA = C2F_CHAR(&TA);
00055       #endif
00056       F77_dgbmv(F77_TA, &F77_M, &F77_N, &F77_KL, &F77_KU, &alpha,  
00057                      A, &F77_lda, X, &F77_incX, &beta, Y, &F77_incY);
00058    }
00059    else if (order == CblasRowMajor)
00060    {
00061       RowMajorStrg = 1;
00062       if (TransA == CblasNoTrans) TA = 'T';
00063       else if (TransA == CblasTrans) TA = 'N';
00064       else if (TransA == CblasConjTrans) TA = 'N';
00065       else 
00066       {
00067          cblas_xerbla(2, "cblas_dgbmv","Illegal TransA setting, %d\n", TransA);
00068          CBLAS_CallFromC = 0;
00069          RowMajorStrg = 0;
00070          return;
00071       }
00072       #ifdef F77_CHAR
00073          F77_TA = C2F_CHAR(&TA);
00074       #endif
00075       F77_dgbmv(F77_TA, &F77_N, &F77_M, &F77_KU, &F77_KL, &alpha, 
00076                      A ,&F77_lda, X,&F77_incX, &beta, Y, &F77_incY);
00077    }
00078    else cblas_xerbla(1, "cblas_dgbmv", "Illegal Order setting, %d\n", order);
00079    CBLAS_CallFromC = 0;
00080    RowMajorStrg = 0;
00081 }


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