00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #include "cblas.h"
00011 #include "cblas_f77.h"
00012 void cblas_zsyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
00013 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
00014 const void *alpha, const void *A, const int lda,
00015 const void *beta, void *C, const int ldc)
00016 {
00017 char UL, TR;
00018 #ifdef F77_CHAR
00019 F77_CHAR F77_TR, F77_UL;
00020 #else
00021 #define F77_TR &TR
00022 #define F77_UL &UL
00023 #endif
00024
00025 #ifdef F77_INT
00026 F77_INT F77_N=N, F77_K=K, F77_lda=lda;
00027 F77_INT F77_ldc=ldc;
00028 #else
00029 #define F77_N N
00030 #define F77_K K
00031 #define F77_lda lda
00032 #define F77_ldc ldc
00033 #endif
00034
00035 extern int CBLAS_CallFromC;
00036 extern int RowMajorStrg;
00037 RowMajorStrg = 0;
00038 CBLAS_CallFromC = 1;
00039
00040 if( Order == CblasColMajor )
00041 {
00042
00043 if( Uplo == CblasUpper) UL='U';
00044 else if ( Uplo == CblasLower ) UL='L';
00045 else
00046 {
00047 cblas_xerbla(2, "cblas_zsyrk", "Illegal Uplo setting, %d\n", Uplo);
00048 CBLAS_CallFromC = 0;
00049 RowMajorStrg = 0;
00050 return;
00051 }
00052
00053 if( Trans == CblasTrans) TR ='T';
00054 else if ( Trans == CblasConjTrans ) TR='C';
00055 else if ( Trans == CblasNoTrans ) TR='N';
00056 else
00057 {
00058 cblas_xerbla(3, "cblas_zsyrk", "Illegal Trans setting, %d\n", Trans);
00059 CBLAS_CallFromC = 0;
00060 RowMajorStrg = 0;
00061 return;
00062 }
00063
00064
00065 #ifdef F77_CHAR
00066 F77_UL = C2F_CHAR(&UL);
00067 F77_TR = C2F_CHAR(&TR);
00068 #endif
00069
00070 F77_zsyrk(F77_UL, F77_TR, &F77_N, &F77_K, alpha, A, &F77_lda,
00071 beta, C, &F77_ldc);
00072 } else if (Order == CblasRowMajor)
00073 {
00074 RowMajorStrg = 1;
00075 if( Uplo == CblasUpper) UL='L';
00076 else if ( Uplo == CblasLower ) UL='U';
00077 else
00078 {
00079 cblas_xerbla(3, "cblas_zsyrk", "Illegal Uplo setting, %d\n", Uplo);
00080 CBLAS_CallFromC = 0;
00081 RowMajorStrg = 0;
00082 return;
00083 }
00084 if( Trans == CblasTrans) TR ='N';
00085 else if ( Trans == CblasConjTrans ) TR='N';
00086 else if ( Trans == CblasNoTrans ) TR='T';
00087 else
00088 {
00089 cblas_xerbla(3, "cblas_zsyrk", "Illegal Trans setting, %d\n", Trans);
00090 CBLAS_CallFromC = 0;
00091 RowMajorStrg = 0;
00092 return;
00093 }
00094
00095 #ifdef F77_CHAR
00096 F77_UL = C2F_CHAR(&UL);
00097 F77_TR = C2F_CHAR(&TR);
00098 #endif
00099
00100 F77_zsyrk(F77_UL, F77_TR, &F77_N, &F77_K, alpha, A, &F77_lda,
00101 beta, C, &F77_ldc);
00102 }
00103 else cblas_xerbla(1, "cblas_zsyrk", "Illegal Order setting, %d\n", Order);
00104 CBLAS_CallFromC = 0;
00105 RowMajorStrg = 0;
00106 return;
00107 }