cblas_dspr.c
Go to the documentation of this file.
00001 /*
00002  *
00003  * cblas_dspr.c
00004  * This program is a C interface to dspr.
00005  * Written by Keita Teranishi
00006  * 4/6/1998
00007  *
00008  */
00009 
00010 #include "cblas.h"
00011 #include "cblas_f77.h"
00012 void cblas_dspr(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 *Ap)
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;
00025 #else
00026    #define F77_N N
00027    #define F77_incX incX
00028 #endif
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_dspr","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_dspr(F77_UL, &F77_N, &alpha, X, &F77_incX, Ap);
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_dspr","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_dspr(F77_UL, &F77_N, &alpha, X, &F77_incX, Ap); 
00066    } else cblas_xerbla(1, "cblas_dspr", "Illegal Order setting, %d\n", order);
00067    CBLAS_CallFromC = 0;
00068    RowMajorStrg = 0;
00069    return;
00070 }


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