00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #include "cblas.h"
00011 #include "cblas_f77.h"
00012 void cblas_dsbmv(const enum CBLAS_ORDER order,
00013 const enum CBLAS_UPLO Uplo, const int N, const int K,
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 UL;
00019 #ifdef F77_CHAR
00020 F77_CHAR F77_UL;
00021 #else
00022 #define F77_UL &UL
00023 #endif
00024 #ifdef F77_INT
00025 F77_INT F77_N=N, F77_K=K, F77_lda=lda, F77_incX=incX, F77_incY=incY;
00026 #else
00027 #define F77_N N
00028 #define F77_K K
00029 #define F77_lda lda
00030 #define F77_incX incX
00031 #define F77_incY incY
00032 #endif
00033 extern int CBLAS_CallFromC;
00034 extern int RowMajorStrg;
00035 RowMajorStrg = 0;
00036
00037 CBLAS_CallFromC = 1;
00038 if (order == CblasColMajor)
00039 {
00040 if (Uplo == CblasUpper) UL = 'U';
00041 else if (Uplo == CblasLower) UL = 'L';
00042 else
00043 {
00044 cblas_xerbla(2, "cblas_dsbmv","Illegal Uplo setting, %d\n",Uplo );
00045 CBLAS_CallFromC = 0;
00046 RowMajorStrg = 0;
00047 return;
00048 }
00049 #ifdef F77_CHAR
00050 F77_UL = C2F_CHAR(&UL);
00051 #endif
00052 F77_dsbmv(F77_UL, &F77_N, &F77_K, &alpha, A, &F77_lda, X,
00053 &F77_incX, &beta, Y, &F77_incY);
00054 }
00055 else if (order == CblasRowMajor)
00056 {
00057 RowMajorStrg = 1;
00058 if (Uplo == CblasUpper) UL = 'L';
00059 else if (Uplo == CblasLower) UL = 'U';
00060 else
00061 {
00062 cblas_xerbla(2, "cblas_dsbmv","Illegal Uplo setting, %d\n", Uplo);
00063 CBLAS_CallFromC = 0;
00064 RowMajorStrg = 0;
00065 return;
00066 }
00067 #ifdef F77_CHAR
00068 F77_UL = C2F_CHAR(&UL);
00069 #endif
00070 F77_dsbmv(F77_UL, &F77_N, &F77_K, &alpha,
00071 A ,&F77_lda, X,&F77_incX, &beta, Y, &F77_incY);
00072 }
00073 else cblas_xerbla(1, "cblas_dsbmv", "Illegal Order setting, %d\n", order);
00074 CBLAS_CallFromC = 0;
00075 RowMajorStrg = 0;
00076 return;
00077 }