Debian Codegraph @

CBLAS/testing/c_sblas1.c

raw
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 CBLAS_INT *N, float *X, const CBLAS_INT *incX)
12 {
13 return cblas_sasum(*N, X, *incX);
14 }
15
16 void F77_saxpy(const CBLAS_INT *N, const float *alpha, const float *X,
17 const CBLAS_INT *incX, float *Y, const CBLAS_INT *incY)
18 {
19 cblas_saxpy(*N, *alpha, X, *incX, Y, *incY);
20 return;
21 }
22
23 float F77_scasum(const CBLAS_INT *N, void *X, const CBLAS_INT *incX)
24 {
25 return cblas_scasum(*N, X, *incX);
26 }
27
28 float F77_scnrm2(const CBLAS_INT *N, const void *X, const CBLAS_INT *incX)
29 {
30 return cblas_scnrm2(*N, X, *incX);
31 }
32
33 void F77_scopy(const CBLAS_INT *N, const float *X, const CBLAS_INT *incX,
34 float *Y, const CBLAS_INT *incY)
35 {
36 cblas_scopy(*N, X, *incX, Y, *incY);
37 return;
38 }
39
40 float F77_sdot(const CBLAS_INT *N, const float *X, const CBLAS_INT *incX,
41 const float *Y, const CBLAS_INT *incY)
42 {
43 return cblas_sdot(*N, X, *incX, Y, *incY);
44 }
45
46 float F77_snrm2(const CBLAS_INT *N, const float *X, const CBLAS_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 CBLAS_INT *N, float *X, const CBLAS_INT *incX, float *Y,
58 const CBLAS_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 CBLAS_INT *N, const float *alpha, float *X,
65 const CBLAS_INT *incX)
66 {
67 cblas_sscal(*N, *alpha, X, *incX);
68 return;
69 }
70
71 void F77_sswap( const CBLAS_INT *N, float *X, const CBLAS_INT *incX,
72 float *Y, const CBLAS_INT *incY)
73 {
74 cblas_sswap(*N,X,*incX,Y,*incY);
75 return;
76 }
77
78 CBLAS_INT F77_isamax(const CBLAS_INT *N, const float *X, const CBLAS_INT *incX)
79 {
80 if (*N < 1 || *incX < 1) return(0);
81 return (cblas_isamax(*N, X, *incX)+1);
82 }