cblas_dsymv.c
Go to the documentation of this file.
00001 /*
00002  *
00003  * cblas_dsymv.c
00004  * This program is a C interface to dsymv.
00005  * Written by Keita Teranishi
00006  * 4/6/1998
00007  *
00008  */
00009 
00010 #include "cblas.h"
00011 #include "cblas_f77.h"
00012 void cblas_dsymv(const enum CBLAS_ORDER order,
00013                  const enum CBLAS_UPLO Uplo, const int N,
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_lda=lda, F77_incX=incX, F77_incY=incY;
00026 #else
00027    #define F77_N N
00028    #define F77_lda lda
00029    #define F77_incX incX
00030    #define F77_incY incY
00031 #endif
00032    extern int CBLAS_CallFromC;
00033    extern int RowMajorStrg;
00034    RowMajorStrg = 0;
00035 
00036    CBLAS_CallFromC = 1;
00037    if (order == CblasColMajor)
00038    {
00039       if (Uplo == CblasUpper) UL = 'U';
00040       else if (Uplo == CblasLower) UL = 'L';
00041       else 
00042       {
00043          cblas_xerbla(2, "cblas_dsymv","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       F77_dsymv(F77_UL, &F77_N, &alpha, A, &F77_lda, X,  
00052                      &F77_incX, &beta, Y, &F77_incY);
00053    }
00054    else if (order == CblasRowMajor)
00055    {
00056       RowMajorStrg = 1;
00057       if (Uplo == CblasUpper) UL = 'L';
00058       else if (Uplo == CblasLower) UL = 'U';
00059       else 
00060       {
00061          cblas_xerbla(2, "cblas_dsymv","Illegal Uplo setting, %d\n", Uplo);
00062          CBLAS_CallFromC = 0;
00063          RowMajorStrg = 0;
00064          return;
00065       }
00066       #ifdef F77_CHAR
00067          F77_UL = C2F_CHAR(&UL);
00068       #endif
00069       F77_dsymv(F77_UL, &F77_N, &alpha, 
00070                      A ,&F77_lda, X,&F77_incX, &beta, Y, &F77_incY);
00071    }
00072    else cblas_xerbla(1, "cblas_dsymv", "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