-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathcblas_adapters.c
149 lines (125 loc) · 5.5 KB
/
cblas_adapters.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
#include <complex.h>
#include "libblastrampoline_internal.h"
/*
* Some libraries provide ILP64-suffixed FORTRAN symbols, but forgot the CBLAS ones.
* To allow Julia to still use `cblas_{c,z}dot{c,u}_sub` when linking against the
* explicitly ILP64-suffixed MKL libraries, we map the CBLAS forwards to the FORTRAN
* symbols, where appropriate. This effects MKL v2022.0, x-ref:
* - https://github.com/JuliaLinearAlgebra/libblastrampoline/issues/56
*/
extern double complex zdotc_(const int32_t *,
const double complex *, const int32_t *,
const double complex *, const int32_t *);
void lbt_cblas_zdotc_sub(const int32_t N,
const double complex *X, const int32_t incX,
const double complex *Y, const int32_t incY,
double complex * z)
{
*z = zdotc_(&N, X, &incX, Y, &incY);
}
extern double complex zdotc_64_(const int64_t *,
const double complex *, const int64_t *,
const double complex *, const int64_t *);
void lbt_cblas_zdotc_sub64_(const int64_t N,
const double complex *X, const int64_t incX,
const double complex *Y, const int64_t incY,
double complex * z)
{
*z = zdotc_64_(&N, X, &incX, Y, &incY);
}
extern double complex zdotu_(const int32_t *,
const double complex *, const int32_t *,
const double complex *, const int32_t *);
void lbt_cblas_zdotu_sub(const int32_t N,
const double complex *X, const int32_t incX,
const double complex *Y, const int32_t incY,
double complex * z)
{
*z = zdotu_(&N, X, &incX, Y, &incY);
}
extern double complex zdotu_64_(const int64_t *,
const double complex *, const int64_t *,
const double complex *, const int64_t *);
void lbt_cblas_zdotu_sub64_(const int64_t N,
const double complex *X, const int64_t incX,
const double complex *Y, const int64_t incY,
double complex * z)
{
*z = zdotu_64_(&N, X, &incX, Y, &incY);
}
extern float complex cdotc_(const int32_t *,
const float complex *, const int32_t *,
const float complex *, const int32_t *);
void lbt_cblas_cdotc_sub(const int32_t N,
const float complex *X, const int32_t incX,
const float complex *Y, const int32_t incY,
float complex * z)
{
*z = cdotc_(&N, X, &incX, Y, &incY);
}
extern float complex cdotc_64_(const int64_t *,
const float complex *, const int64_t *,
const float complex *, const int64_t *);
void lbt_cblas_cdotc_sub64_(const int64_t N,
const float complex *X, const int64_t incX,
const float complex *Y, const int64_t incY,
float complex * z)
{
*z = cdotc_64_(&N, X, &incX, Y, &incY);
}
extern float complex cdotu_(const int32_t *,
const float complex *, const int32_t *,
const float complex *, const int32_t *);
void lbt_cblas_cdotu_sub(const int32_t N,
const float complex *X, const int32_t incX,
const float complex *Y, const int32_t incY,
float complex * z)
{
*z = cdotu_(&N, X, &incX, Y, &incY);
}
extern float complex cdotu_64_(const int64_t *,
const float complex *, const int64_t *,
const float complex *, const int64_t *);
void lbt_cblas_cdotu_sub64_(const int64_t N,
const float complex *X, const int64_t incX,
const float complex *Y, const int64_t incY,
float complex * z)
{
*z = cdotu_64_(&N, X, &incX, Y, &incY);
}
extern float sdot_(const int32_t *,
const float *, const int32_t *,
const float *, const int32_t *);
float lbt_cblas_sdot(const int32_t N,
const float *X, const int32_t incX,
const float *Y, const int32_t incY)
{
return sdot_(&N, X, &incX, Y, &incY);
}
extern float sdot_64_(const int64_t *,
const float *, const int64_t *,
const float *, const int64_t *);
float lbt_cblas_sdot64_(const int64_t N,
const float *X, const int64_t incX,
const float *Y, const int64_t incY)
{
return sdot_64_(&N, X, &incX, Y, &incY);
}
extern double ddot_(const int32_t *,
const double *, const int32_t *,
const double *, const int32_t *);
double lbt_cblas_ddot(const int32_t N,
const double *X, const int32_t incX,
const double *Y, const int32_t incY)
{
return ddot_(&N, X, &incX, Y, &incY);
}
extern double ddot_64_(const int64_t *,
const double *, const int64_t *,
const double *, const int64_t *);
double lbt_cblas_ddot64_(const int64_t N,
const double *X, const int64_t incX,
const double *Y, const int64_t incY)
{
return ddot_64_(&N, X, &incX, Y, &incY);
}