|
kusano |
2b45e8 |
/*
|
|
kusano |
2b45e8 |
* c_cblas1.c
|
|
kusano |
2b45e8 |
*
|
|
kusano |
2b45e8 |
* The program is a C wrapper for ccblat1.
|
|
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 |
void F77_caxpy(const int *N, const void *alpha, void *X,
|
|
kusano |
2b45e8 |
const int *incX, void *Y, const int *incY)
|
|
kusano |
2b45e8 |
{
|
|
kusano |
2b45e8 |
cblas_caxpy(*N, alpha, X, *incX, Y, *incY);
|
|
kusano |
2b45e8 |
return;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
void F77_ccopy(const int *N, void *X, const int *incX,
|
|
kusano |
2b45e8 |
void *Y, const int *incY)
|
|
kusano |
2b45e8 |
{
|
|
kusano |
2b45e8 |
cblas_ccopy(*N, X, *incX, Y, *incY);
|
|
kusano |
2b45e8 |
return;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
void F77_cdotc(const int *N, void *X, const int *incX,
|
|
kusano |
2b45e8 |
void *Y, const int *incY, void *dotc)
|
|
kusano |
2b45e8 |
{
|
|
kusano |
2b45e8 |
cblas_cdotc_sub(*N, X, *incX, Y, *incY, dotc);
|
|
kusano |
2b45e8 |
return;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
void F77_cdotu(const int *N, void *X, const int *incX,
|
|
kusano |
2b45e8 |
void *Y, const int *incY,void *dotu)
|
|
kusano |
2b45e8 |
{
|
|
kusano |
2b45e8 |
cblas_cdotu_sub(*N, X, *incX, Y, *incY, dotu);
|
|
kusano |
2b45e8 |
return;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
void F77_cscal(const int *N, const void * *alpha, void *X,
|
|
kusano |
2b45e8 |
const int *incX)
|
|
kusano |
2b45e8 |
{
|
|
kusano |
2b45e8 |
cblas_cscal(*N, alpha, X, *incX);
|
|
kusano |
2b45e8 |
return;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
void F77_csscal(const int *N, const float *alpha, void *X,
|
|
kusano |
2b45e8 |
const int *incX)
|
|
kusano |
2b45e8 |
{
|
|
kusano |
2b45e8 |
cblas_csscal(*N, *alpha, X, *incX);
|
|
kusano |
2b45e8 |
return;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
void F77_cswap( const int *N, void *X, const int *incX,
|
|
kusano |
2b45e8 |
void *Y, const int *incY)
|
|
kusano |
2b45e8 |
{
|
|
kusano |
2b45e8 |
cblas_cswap(*N,X,*incX,Y,*incY);
|
|
kusano |
2b45e8 |
return;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
int F77_icamax(const int *N, const void *X, const int *incX)
|
|
kusano |
2b45e8 |
{
|
|
kusano |
2b45e8 |
if (*N < 1 || *incX < 1) return(0);
|
|
kusano |
2b45e8 |
return (cblas_icamax(*N, X, *incX)+1);
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
float F77_scnrm2(const int *N, const void *X, const int *incX)
|
|
kusano |
2b45e8 |
{
|
|
kusano |
2b45e8 |
return cblas_scnrm2(*N, X, *incX);
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
float F77_scasum(const int *N, void *X, const int *incX)
|
|
kusano |
2b45e8 |
{
|
|
kusano |
2b45e8 |
return cblas_scasum(*N, X, *incX);
|
|
kusano |
2b45e8 |
}
|