Home | History | Annotate | Download | only in testing
      1 /*
      2  * c_sblas1.c
      3  *
      4  * The program is a C wrapper for scblat1.
      5  *
      6  * Written by Keita Teranishi.  2/11/1998
      7  *
      8  */
      9 #include "cblas_test.h"
     10 #include "cblas.h"
     11 float F77_sasum(const int *N, float *X, const int *incX)
     12 {
     13    return cblas_sasum(*N, X, *incX);
     14 }
     15 
     16 void F77_saxpy(const int *N, const float *alpha, const float *X,
     17                     const int *incX, float *Y, const int *incY)
     18 {
     19    cblas_saxpy(*N, *alpha, X, *incX, Y, *incY);
     20    return;
     21 }
     22 
     23 float F77_scasum(const int *N, void *X, const int *incX)
     24 {
     25    return cblas_scasum(*N, X, *incX);
     26 }
     27 
     28 float F77_scnrm2(const int *N, const void *X, const int *incX)
     29 {
     30    return cblas_scnrm2(*N, X, *incX);
     31 }
     32 
     33 void F77_scopy(const int *N, const float *X, const int *incX,
     34                     float *Y, const int *incY)
     35 {
     36    cblas_scopy(*N, X, *incX, Y, *incY);
     37    return;
     38 }
     39 
     40 float F77_sdot(const int *N, const float *X, const int *incX,
     41                         const float *Y, const int *incY)
     42 {
     43    return cblas_sdot(*N, X, *incX, Y, *incY);
     44 }
     45 
     46 float F77_snrm2(const int *N, const float *X, const int *incX)
     47 {
     48    return cblas_snrm2(*N, X, *incX);
     49 }
     50 
     51 void F77_srotg( float *a, float *b, float *c, float *s)
     52 {
     53    cblas_srotg(a,b,c,s);
     54    return;
     55 }
     56 
     57 void F77_srot( const int *N, float *X, const int *incX, float *Y,
     58               const int *incY, const float  *c, const float  *s)
     59 {
     60    cblas_srot(*N,X,*incX,Y,*incY,*c,*s);
     61    return;
     62 }
     63 
     64 void F77_sscal(const int *N, const float *alpha, float *X,
     65                          const int *incX)
     66 {
     67    cblas_sscal(*N, *alpha, X, *incX);
     68    return;
     69 }
     70 
     71 void F77_sswap( const int *N, float *X, const int *incX,
     72                           float *Y, const int *incY)
     73 {
     74    cblas_sswap(*N,X,*incX,Y,*incY);
     75    return;
     76 }
     77 
     78 int F77_isamax(const int *N, const float *X, const int *incX)
     79 {
     80    if (*N < 1 || *incX < 1) return(0);
     81    return (cblas_isamax(*N, X, *incX)+1);
     82 }
     83