|
kusano |
2b45e8 |
/*
|
|
kusano |
2b45e8 |
* c_sblas1.c
|
|
kusano |
2b45e8 |
*
|
|
kusano |
2b45e8 |
* The program is a C wrapper for scblat1.
|
|
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 |
float F77_sasum(blasint *N, float *X, blasint *incX)
|
|
kusano |
2b45e8 |
{
|
|
kusano |
2b45e8 |
return cblas_sasum(*N, X, *incX);
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
void F77_saxpy(blasint *N, const float *alpha, const float *X,
|
|
kusano |
2b45e8 |
blasint *incX, float *Y, blasint *incY)
|
|
kusano |
2b45e8 |
{
|
|
kusano |
2b45e8 |
cblas_saxpy(*N, *alpha, X, *incX, Y, *incY);
|
|
kusano |
2b45e8 |
return;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
float F77_scasum(blasint *N, float *X, blasint *incX)
|
|
kusano |
2b45e8 |
{
|
|
kusano |
2b45e8 |
return cblas_scasum(*N, X, *incX);
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
float F77_scnrm2(blasint *N, const float *X, blasint *incX)
|
|
kusano |
2b45e8 |
{
|
|
kusano |
2b45e8 |
return cblas_scnrm2(*N, X, *incX);
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
void F77_scopy(blasint *N, const float *X, blasint *incX,
|
|
kusano |
2b45e8 |
float *Y, blasint *incY)
|
|
kusano |
2b45e8 |
{
|
|
kusano |
2b45e8 |
cblas_scopy(*N, X, *incX, Y, *incY);
|
|
kusano |
2b45e8 |
return;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
float F77_sdot(blasint *N, const float *X, blasint *incX,
|
|
kusano |
2b45e8 |
const float *Y, blasint *incY)
|
|
kusano |
2b45e8 |
{
|
|
kusano |
2b45e8 |
return cblas_sdot(*N, X, *incX, Y, *incY);
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
float F77_snrm2(blasint *N, const float *X, blasint *incX)
|
|
kusano |
2b45e8 |
{
|
|
kusano |
2b45e8 |
return cblas_snrm2(*N, X, *incX);
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
void F77_srotg( float *a, float *b, float *c, float *s)
|
|
kusano |
2b45e8 |
{
|
|
kusano |
2b45e8 |
cblas_srotg(a,b,c,s);
|
|
kusano |
2b45e8 |
return;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
void F77_srot( blasint *N, float *X, blasint *incX, float *Y,
|
|
kusano |
2b45e8 |
blasint *incY, const float *c, const float *s)
|
|
kusano |
2b45e8 |
{
|
|
kusano |
2b45e8 |
cblas_srot(*N,X,*incX,Y,*incY,*c,*s);
|
|
kusano |
2b45e8 |
return;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
void F77_sscal(blasint *N, const float *alpha, float *X,
|
|
kusano |
2b45e8 |
blasint *incX)
|
|
kusano |
2b45e8 |
{
|
|
kusano |
2b45e8 |
cblas_sscal(*N, *alpha, X, *incX);
|
|
kusano |
2b45e8 |
return;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
void F77_sswap( blasint *N, float *X, blasint *incX,
|
|
kusano |
2b45e8 |
float *Y, blasint *incY)
|
|
kusano |
2b45e8 |
{
|
|
kusano |
2b45e8 |
cblas_sswap(*N,X,*incX,Y,*incY);
|
|
kusano |
2b45e8 |
return;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
int F77_isamax(blasint *N, const float *X, blasint *incX)
|
|
kusano |
2b45e8 |
{
|
|
kusano |
2b45e8 |
if (*N < 1 || *incX < 1) return(0);
|
|
kusano |
2b45e8 |
return (cblas_isamax(*N, X, *incX)+1);
|
|
kusano |
2b45e8 |
}
|