-
Notifications
You must be signed in to change notification settings - Fork 1
/
dotwrp.c
79 lines (66 loc) · 1.78 KB
/
dotwrp.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// compile with: clang -c dotwrp.c
#include <complex.h>
#include <vecLib/cblas.h>
#ifdef DOTWRP_GLOBAL
#define DYLIB_LOCAL
#else
#define DYLIB_LOCAL __attribute__ ((visibility ("hidden")))
#endif
DYLIB_LOCAL
double complex zdotc_( const int* n, const double complex* x, const int* ix, const double complex *y, const int* iy )
{
double complex z;
cblas_zdotc_sub( *n, x, *ix, y, *iy, &z );
return z;
}
DYLIB_LOCAL
double complex zdotu_( const int* n, const double complex* x, const int* ix, const double complex *y, const int* iy )
{
double complex z;
cblas_zdotu_sub( *n, x, *ix, y, *iy, &z );
return z;
}
DYLIB_LOCAL
float complex cdotc_( const int* n, const float complex* x, const int* ix, const float complex *y, const int* iy )
{
float complex z;
cblas_cdotc_sub( *n, x, *ix, y, *iy, &z );
return z;
}
DYLIB_LOCAL
float complex cdotu_( const int* n, const float complex* x, const int* ix, const float complex *y, const int* iy )
{
float complex z;
cblas_cdotu_sub( *n, x, *ix, y, *iy, &z );
return z;
}
DYLIB_LOCAL
float sdot_( const int* n, const float* x, const int* ix, const float *y, const int* iy )
{
return cblas_sdot( *n, x, *ix, y, *iy );
}
DYLIB_LOCAL
float sdsdot_( const int* n, const float* a, const float* x, const int* ix, const float *y, const int* iy )
{
return cblas_sdsdot( *n, *a, x, *ix, y, *iy );
}
DYLIB_LOCAL
float snrm2_( const int* n, const float* x, const int* ix )
{
return cblas_snrm2( *n, x, *ix );
}
DYLIB_LOCAL
float sasum_( const int* n, const float* x, const int* ix )
{
return cblas_snrm2( *n, x, *ix );
}
DYLIB_LOCAL
float scnrm2_( const int* n, const float complex* x, const int* ix )
{
return cblas_scnrm2( *n, x, *ix );
}
DYLIB_LOCAL
float scasum_( const int* n, const float complex* x, const int* ix )
{
return cblas_scasum( *n, x, *ix );
}