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


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