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