Home | History | Annotate | Download | only in testing
      1 /*
      2  * c_dblas1.c
      3  *
      4  * The program is a C wrapper for dcblat1.
      5  *
      6  * Written by Keita Teranishi.  2/11/1998
      7  *
      8  */
      9 #include "cblas_test.h"
     10 #include "cblas.h"
     11 double F77_dasum(const int *N, double *X, const int *incX)
     12 {
     13    return cblas_dasum(*N, X, *incX);
     14 }
     15 
     16 void F77_daxpy(const int *N, const double *alpha, const double *X,
     17                     const int *incX, double *Y, const int *incY)
     18 {
     19    cblas_daxpy(*N, *alpha, X, *incX, Y, *incY);
     20    return;
     21 }
     22 
     23 void F77_dcopy(const int *N, double *X, const int *incX,
     24                     double *Y, const int *incY)
     25 {
     26    cblas_dcopy(*N, X, *incX, Y, *incY);
     27    return;
     28 }
     29 
     30 double F77_ddot(const int *N, const double *X, const int *incX,
     31                 const double *Y, const int *incY)
     32 {
     33    return cblas_ddot(*N, X, *incX, Y, *incY);
     34 }
     35 
     36 double F77_dnrm2(const int *N, const double *X, const int *incX)
     37 {
     38    return cblas_dnrm2(*N, X, *incX);
     39 }
     40 
     41 void F77_drotg( double *a, double *b, double *c, double *s)
     42 {
     43    cblas_drotg(a,b,c,s);
     44    return;
     45 }
     46 
     47 void F77_drot( const int *N, double *X, const int *incX, double *Y,
     48        const int *incY, const double *c, const double *s)
     49 {
     50 
     51    cblas_drot(*N,X,*incX,Y,*incY,*c,*s);
     52    return;
     53 }
     54 
     55 void F77_dscal(const int *N, const double *alpha, double *X,
     56                          const int *incX)
     57 {
     58    cblas_dscal(*N, *alpha, X, *incX);
     59    return;
     60 }
     61 
     62 void F77_dswap( const int *N, double *X, const int *incX,
     63                           double *Y, const int *incY)
     64 {
     65    cblas_dswap(*N,X,*incX,Y,*incY);
     66    return;
     67 }
     68 
     69 double F77_dzasum(const int *N, void *X, const int *incX)
     70 {
     71    return cblas_dzasum(*N, X, *incX);
     72 }
     73 
     74 double F77_dznrm2(const int *N, const void *X, const int *incX)
     75 {
     76    return cblas_dznrm2(*N, X, *incX);
     77 }
     78 
     79 int F77_idamax(const int *N, const double *X, const int *incX)
     80 {
     81    if (*N < 1 || *incX < 1) return(0);
     82    return (cblas_idamax(*N, X, *incX)+1);
     83 }
     84