Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008 #include "cblas.h"
00009 #include "cblas_f77.h"
00010 void cblas_dspr2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00011 const int N, const double alpha, const double *X,
00012 const int incX, const double *Y, const int incY, double *A)
00013 {
00014 char UL;
00015 #ifdef F77_CHAR
00016 F77_CHAR F77_UL;
00017 #else
00018 #define F77_UL &UL
00019 #endif
00020
00021 #ifdef F77_INT
00022 F77_INT F77_N=N, F77_incX=incX, F77_incY=incY;
00023 #else
00024 #define F77_N N
00025 #define F77_incX incX
00026 #define F77_incY incY
00027 #endif
00028
00029 extern int CBLAS_CallFromC;
00030 extern int RowMajorStrg;
00031 RowMajorStrg = 0;
00032 CBLAS_CallFromC = 1;
00033 if (order == CblasColMajor)
00034 {
00035 if (Uplo == CblasLower) UL = 'L';
00036 else if (Uplo == CblasUpper) UL = 'U';
00037 else
00038 {
00039 cblas_xerbla(2, "cblas_dspr2","Illegal Uplo setting, %d\n",Uplo );
00040 CBLAS_CallFromC = 0;
00041 RowMajorStrg = 0;
00042 return;
00043 }
00044 #ifdef F77_CHAR
00045 F77_UL = C2F_CHAR(&UL);
00046 #endif
00047
00048 F77_dspr2(F77_UL, &F77_N, &alpha, X, &F77_incX, Y, &F77_incY, A);
00049
00050 } else if (order == CblasRowMajor)
00051 {
00052 RowMajorStrg = 1;
00053 if (Uplo == CblasLower) UL = 'U';
00054 else if (Uplo == CblasUpper) UL = 'L';
00055 else
00056 {
00057 cblas_xerbla(2, "cblas_dspr2","Illegal Uplo setting, %d\n",Uplo );
00058 CBLAS_CallFromC = 0;
00059 RowMajorStrg = 0;
00060 return;
00061 }
00062 #ifdef F77_CHAR
00063 F77_UL = C2F_CHAR(&UL);
00064 #endif
00065 F77_dspr2(F77_UL, &F77_N, &alpha, X, &F77_incX, Y, &F77_incY, A);
00066 } else cblas_xerbla(1, "cblas_dspr2", "Illegal Order setting, %d\n", order);
00067 CBLAS_CallFromC = 0;
00068 RowMajorStrg = 0;
00069 return;
00070 }