|
kusano |
2b45e8 |
/*
|
|
kusano |
2b45e8 |
* c_dblas1.c
|
|
kusano |
2b45e8 |
*
|
|
kusano |
2b45e8 |
* The program is a C wrapper for dcblat1.
|
|
kusano |
2b45e8 |
*
|
|
kusano |
2b45e8 |
* Written by Keita Teranishi. 2/11/1998
|
|
kusano |
2b45e8 |
*
|
|
kusano |
2b45e8 |
*/
|
|
kusano |
2b45e8 |
#include "common.h"
|
|
kusano |
2b45e8 |
#include "cblas_test.h"
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
double F77_dasum(const int *N, double *X, const int *incX)
|
|
kusano |
2b45e8 |
{
|
|
kusano |
2b45e8 |
return cblas_dasum(*N, X, *incX);
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
void F77_daxpy(const int *N, const double *alpha, const double *X,
|
|
kusano |
2b45e8 |
const int *incX, double *Y, const int *incY)
|
|
kusano |
2b45e8 |
{
|
|
kusano |
2b45e8 |
cblas_daxpy(*N, *alpha, X, *incX, Y, *incY);
|
|
kusano |
2b45e8 |
return;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
void F77_dcopy(const int *N, double *X, const int *incX,
|
|
kusano |
2b45e8 |
double *Y, const int *incY)
|
|
kusano |
2b45e8 |
{
|
|
kusano |
2b45e8 |
cblas_dcopy(*N, X, *incX, Y, *incY);
|
|
kusano |
2b45e8 |
return;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
double F77_ddot(const int *N, const double *X, const int *incX,
|
|
kusano |
2b45e8 |
const double *Y, const int *incY)
|
|
kusano |
2b45e8 |
{
|
|
kusano |
2b45e8 |
return cblas_ddot(*N, X, *incX, Y, *incY);
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
double F77_dnrm2(const int *N, const double *X, const int *incX)
|
|
kusano |
2b45e8 |
{
|
|
kusano |
2b45e8 |
return cblas_dnrm2(*N, X, *incX);
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
void F77_drotg( double *a, double *b, double *c, double *s)
|
|
kusano |
2b45e8 |
{
|
|
kusano |
2b45e8 |
cblas_drotg(a,b,c,s);
|
|
kusano |
2b45e8 |
return;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
void F77_drot( const int *N, double *X, const int *incX, double *Y,
|
|
kusano |
2b45e8 |
const int *incY, const double *c, const double *s)
|
|
kusano |
2b45e8 |
{
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
cblas_drot(*N,X,*incX,Y,*incY,*c,*s);
|
|
kusano |
2b45e8 |
return;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
void F77_dscal(const int *N, const double *alpha, double *X,
|
|
kusano |
2b45e8 |
const int *incX)
|
|
kusano |
2b45e8 |
{
|
|
kusano |
2b45e8 |
cblas_dscal(*N, *alpha, X, *incX);
|
|
kusano |
2b45e8 |
return;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
void F77_dswap( const int *N, double *X, const int *incX,
|
|
kusano |
2b45e8 |
double *Y, const int *incY)
|
|
kusano |
2b45e8 |
{
|
|
kusano |
2b45e8 |
cblas_dswap(*N,X,*incX,Y,*incY);
|
|
kusano |
2b45e8 |
return;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
double F77_dzasum(const int *N, void *X, const int *incX)
|
|
kusano |
2b45e8 |
{
|
|
kusano |
2b45e8 |
return cblas_dzasum(*N, X, *incX);
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
double F77_dznrm2(const int *N, const void *X, const int *incX)
|
|
kusano |
2b45e8 |
{
|
|
kusano |
2b45e8 |
return cblas_dznrm2(*N, X, *incX);
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
int F77_idamax(const int *N, const double *X, const int *incX)
|
|
kusano |
2b45e8 |
{
|
|
kusano |
2b45e8 |
if (*N < 1 || *incX < 1) return(0);
|
|
kusano |
2b45e8 |
return (cblas_idamax(*N, X, *incX)+1);
|
|
kusano |
2b45e8 |
}
|