| 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 CBLAS_INT *N, double *X, const CBLAS_INT *incX) |
| 12 |
{ |
| 13 |
return cblas_dasum(*N, X, *incX); |
| 14 |
} |
| 15 |
|
| 16 |
void F77_daxpy(const CBLAS_INT *N, const double *alpha, const double *X, |
| 17 |
const CBLAS_INT *incX, double *Y, const CBLAS_INT *incY) |
| 18 |
{ |
| 19 |
cblas_daxpy(*N, *alpha, X, *incX, Y, *incY); |
| 20 |
return; |
| 21 |
} |
| 22 |
|
| 23 |
void F77_dcopy(const CBLAS_INT *N, double *X, const CBLAS_INT *incX, |
| 24 |
double *Y, const CBLAS_INT *incY) |
| 25 |
{ |
| 26 |
cblas_dcopy(*N, X, *incX, Y, *incY); |
| 27 |
return; |
| 28 |
} |
| 29 |
|
| 30 |
double F77_ddot(const CBLAS_INT *N, const double *X, const CBLAS_INT *incX, |
| 31 |
const double *Y, const CBLAS_INT *incY) |
| 32 |
{ |
| 33 |
return cblas_ddot(*N, X, *incX, Y, *incY); |
| 34 |
} |
| 35 |
|
| 36 |
double F77_dnrm2(const CBLAS_INT *N, const double *X, const CBLAS_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 CBLAS_INT *N, double *X, const CBLAS_INT *incX, double *Y, |
| 48 |
const CBLAS_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 CBLAS_INT *N, const double *alpha, double *X, |
| 56 |
const CBLAS_INT *incX) |
| 57 |
{ |
| 58 |
cblas_dscal(*N, *alpha, X, *incX); |
| 59 |
return; |
| 60 |
} |
| 61 |
|
| 62 |
void F77_dswap( const CBLAS_INT *N, double *X, const CBLAS_INT *incX, |
| 63 |
double *Y, const CBLAS_INT *incY) |
| 64 |
{ |
| 65 |
cblas_dswap(*N,X,*incX,Y,*incY); |
| 66 |
return; |
| 67 |
} |
| 68 |
|
| 69 |
double F77_dzasum(const CBLAS_INT *N, void *X, const CBLAS_INT *incX) |
| 70 |
{ |
| 71 |
return cblas_dzasum(*N, X, *incX); |
| 72 |
} |
| 73 |
|
| 74 |
double F77_dznrm2(const CBLAS_INT *N, const void *X, const CBLAS_INT *incX) |
| 75 |
{ |
| 76 |
return cblas_dznrm2(*N, X, *incX); |
| 77 |
} |
| 78 |
|
| 79 |
CBLAS_INT F77_idamax(const CBLAS_INT *N, const double *X, const CBLAS_INT *incX) |
| 80 |
{ |
| 81 |
if (*N < 1 || *incX < 1) return(0); |
| 82 |
return (cblas_idamax(*N, X, *incX)+1); |
| 83 |
} |