cblas_csymm.c
Go to the documentation of this file.
00001 /*
00002  *
00003  * cblas_csymm.c
00004  * This program is a C interface to csymm.
00005  * Written by Keita Teranishi
00006  * 4/8/1998
00007  *
00008  */
00009 
00010 #include "cblas.h"
00011 #include "cblas_f77.h"
00012 void cblas_csymm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
00013                  const enum CBLAS_UPLO Uplo, const int M, const int N,
00014                  const void *alpha, const void  *A, const int lda,
00015                  const void  *B, const int ldb, const void *beta,
00016                  void  *C, const int ldc)
00017 {
00018    char SD, UL;   
00019 #ifdef F77_CHAR
00020    F77_CHAR F77_SD, F77_UL;
00021 #else
00022    #define F77_SD &SD  
00023    #define F77_UL &UL  
00024 #endif
00025 
00026 #ifdef F77_INT
00027    F77_INT F77_M=M, F77_N=N, F77_lda=lda, F77_ldb=ldb;
00028    F77_INT F77_ldc=ldc;
00029 #else
00030    #define F77_M M
00031    #define F77_N N
00032    #define F77_lda lda
00033    #define F77_ldb ldb
00034    #define F77_ldc ldc
00035 #endif
00036 
00037    extern int CBLAS_CallFromC;
00038    extern int RowMajorStrg;
00039    RowMajorStrg = 0;
00040    CBLAS_CallFromC = 1;
00041 
00042    if( Order == CblasColMajor )
00043    {
00044       if( Side == CblasRight) SD='R';
00045       else if ( Side == CblasLeft ) SD='L';
00046       else 
00047       {
00048          cblas_xerbla(2, "cblas_csymm", "Illegal Side setting, %d\n", Side);
00049          CBLAS_CallFromC = 0;
00050          RowMajorStrg = 0;
00051          return;
00052       }
00053 
00054       if( Uplo == CblasUpper) UL='U';
00055       else if ( Uplo == CblasLower ) UL='L';
00056       else 
00057       {
00058          cblas_xerbla(3, "cblas_csymm", "Illegal Uplo setting, %d\n", Uplo);
00059          CBLAS_CallFromC = 0;
00060          RowMajorStrg = 0;
00061          return;
00062       }
00063 
00064       #ifdef F77_CHAR
00065          F77_UL = C2F_CHAR(&UL);
00066          F77_SD = C2F_CHAR(&SD);
00067       #endif
00068 
00069       F77_csymm(F77_SD, F77_UL, &F77_M, &F77_N, alpha, A, &F77_lda,
00070                       B, &F77_ldb, beta, C, &F77_ldc);
00071    } else if (Order == CblasRowMajor)
00072    {
00073       RowMajorStrg = 1;
00074       if( Side == CblasRight) SD='L';
00075       else if ( Side == CblasLeft ) SD='R';
00076       else 
00077       {
00078          cblas_xerbla(2, "cblas_csymm", "Illegal Side setting, %d\n", Side);
00079          CBLAS_CallFromC = 0;
00080          RowMajorStrg = 0;
00081          return;
00082       }
00083 
00084       if( Uplo == CblasUpper) UL='L';
00085       else if ( Uplo == CblasLower ) UL='U';
00086       else 
00087       {
00088          cblas_xerbla(3, "cblas_csymm", "Illegal Uplo setting, %d\n", Uplo);
00089          CBLAS_CallFromC = 0;
00090          RowMajorStrg = 0;
00091          return;
00092       }
00093 
00094       #ifdef F77_CHAR
00095          F77_UL = C2F_CHAR(&UL);
00096          F77_SD = C2F_CHAR(&SD);
00097       #endif
00098 
00099       F77_csymm(F77_SD, F77_UL, &F77_N, &F77_M, alpha, A, &F77_lda,
00100                      B, &F77_ldb, beta, C, &F77_ldc);
00101    } 
00102    else cblas_xerbla(1, "cblas_csymm", "Illegal Order setting, %d\n", Order);
00103    CBLAS_CallFromC = 0;
00104    RowMajorStrg = 0;
00105    return;
00106 } 


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