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