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


swiftnav
Author(s):
autogenerated on Sat Jun 8 2019 18:55:15