├── go.mod
├── README.md
├── const.go
├── LICENSE
└── openblas.go
/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/blast-go/openblas
2 |
3 | go 1.20
4 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Go Bindings for OpenBLAS  [](https://godoc.org/github.com/blast-go/openblas)
2 |
3 |
4 |
5 | Package [openblas](https://github.com/blast-go/openblas) provides Go bindings
6 | for [OpenBLAS](https://www.openblas.net/) — an optimized BLAS library based on
7 | GotoBLAS2.
8 |
9 | ## How to use
10 |
11 | Using OpenBLAS routines in Go is straightforward just import the package and call any routine.
12 |
13 | ```go
14 | import "github.com/blast-go/openblas"
15 | ```
16 |
17 | ## Caveats
18 |
19 | To use this library you need `CGO_ENABLED=1` and have OpenBLAS library installed
20 | in your system.
--------------------------------------------------------------------------------
/const.go:
--------------------------------------------------------------------------------
1 | // MIT
2 |
3 | // WARNING: This file has automatically been generated on Thu, 23 Mar 2023 14:08:30 CDT.
4 | // Code generated by https://git.io/c-for-go. DO NOT EDIT.
5 |
6 | package openblas
7 |
8 | /*
9 | #include "cblas.h"
10 | #include
11 | */
12 | import "C"
13 |
14 | const (
15 | Sequential = 0
16 | Thread = 1
17 | OpenMP = 2
18 | )
19 |
20 | type Order int32
21 |
22 | const (
23 | Rowmajor Order = C.CblasRowMajor
24 | Colmajor Order = C.CblasColMajor
25 | )
26 |
27 | type Transpose int32
28 |
29 | const (
30 | Notrans Transpose = C.CblasNoTrans
31 | Trans Transpose = C.CblasTrans
32 | Conjtrans Transpose = C.CblasConjTrans
33 | Conjnotrans Transpose = C.CblasConjNoTrans
34 | )
35 |
36 | type UpLo int32
37 |
38 | const (
39 | Upper UpLo = C.CblasUpper
40 | Lower UpLo = C.CblasLower
41 | )
42 |
43 | type Diag int32
44 |
45 | const (
46 | NonUnit Diag = C.CblasNonUnit
47 | Unit Diag = C.CblasUnit
48 | )
49 |
50 | type Side int32
51 |
52 | const (
53 | Left Side = C.CblasLeft
54 | Right Side = C.CblasRight
55 | )
56 |
57 | type Layout int32
58 |
59 | type Bfloat16 uint16
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 blast-go
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/openblas.go:
--------------------------------------------------------------------------------
1 | // MIT
2 | package openblas
3 |
4 | /*
5 | #cgo darwin CFLAGS: -I/usr/local/opt/openblas/include
6 | #cgo darwin LDFLAGS: -L/usr/local/opt/openblas/lib -lopenblas
7 | #include "cblas.h"
8 | */
9 | import "C"
10 | import (
11 | "unsafe"
12 | )
13 |
14 | func SetNumThreads(numThreads int32) {
15 | C.openblas_set_num_threads((C.int)(numThreads))
16 |
17 | }
18 |
19 | func GotoSetNumThreads(numThreads int32) {
20 | C.goto_set_num_threads((C.int)(numThreads))
21 | }
22 |
23 | func GetNumThreads() int32 {
24 | return int32(C.openblas_get_num_threads())
25 | }
26 |
27 | func GetNumProcs() int32 {
28 | return int32(C.openblas_get_num_procs())
29 | }
30 |
31 | func GetConfig() string {
32 | return C.GoString(C.openblas_get_config())
33 | }
34 |
35 | func GetCorename() string {
36 | return C.GoString(C.openblas_get_corename())
37 | }
38 |
39 | func GetParallel() int32 {
40 | return int32(C.openblas_get_parallel())
41 | }
42 |
43 | // Dsdot returns the dot product of two single-precision vectors.
44 | func Dsdot(n int, x []float32, incX int, y []float32, incY int) float64 {
45 | return float64(C.cblas_dsdot(C.blasint(n), (*C.float)(unsafe.Pointer(&x[0])), C.blasint(incX), (*C.float)(unsafe.Pointer(&y[0])), C.blasint(incY)))
46 | }
47 |
48 | // Sdsdot returns the dot product of two single-precision vectors with a correction term.
49 | func Sdsdot(n int, alpha float32, x []float32, incX int, y []float32, incY int) float32 {
50 | return float32(C.cblas_sdsdot(C.blasint(n), C.float(alpha), (*C.float)(unsafe.Pointer(&x[0])), C.blasint(incX), (*C.float)(unsafe.Pointer(&y[0])), C.blasint(incY)))
51 | }
52 |
53 | // Ddot returns the dot product of two double-precision vectors.
54 | func Ddot(n int, x []float64, incX int, y []float64, incY int) float64 {
55 | return float64(C.cblas_ddot(C.blasint(n), (*C.double)(unsafe.Pointer(&x[0])), C.blasint(incX), (*C.double)(unsafe.Pointer(&y[0])), C.blasint(incY)))
56 | }
57 |
58 | // Sdot returns the dot product of two single-precision vectors.
59 | func Sdot(n int, x []float32, incX int, y []float32, incY int) float32 {
60 | return float32(C.cblas_sdot(C.blasint(n), (*C.float)(unsafe.Pointer(&x[0])), C.blasint(incX), (*C.float)(unsafe.Pointer(&y[0])), C.blasint(incY)))
61 | }
62 |
63 | // Cdotu returns the dot product of two complex single-precision vectors.
64 | func Cdotu(n int, x []complex64, incX int, y []complex64, incY int) complex64 {
65 | return complex64(C.cblas_cdotu(C.blasint(n), (unsafe.Pointer(&x[0])), C.blasint(incX), (unsafe.Pointer(&y[0])), C.blasint(incY)))
66 | }
67 |
68 | // Cdotc returns the dot product of two complex single-precision vectors conjugating the first.
69 | func Cdotc(n int, x []complex64, incX int, y []complex64, incY int) complex64 {
70 | return complex64(C.cblas_cdotc(C.blasint(n), (unsafe.Pointer(&x[0])), C.blasint(incX), (unsafe.Pointer(&y[0])), C.blasint(incY)))
71 | }
72 |
73 | // Zdotu returns the dot product of two complex double-precision vectors.
74 | func Zdotu(n int, x []complex128, incX int, y []complex128, incY int) complex128 {
75 | return complex128(C.cblas_zdotu(C.blasint(n), (unsafe.Pointer(&x[0])), C.blasint(incX), (unsafe.Pointer(&y[0])), C.blasint(incY)))
76 | }
77 |
78 | // Zdotc returns the dot product of two complex double-precision vectors conjugating the first.
79 | func Zdotc(n int, x []complex128, incX int, y []complex128, incY int) complex128 {
80 | return complex128(C.cblas_zdotc(C.blasint(n), (unsafe.Pointer(&x[0])), C.blasint(incX), (unsafe.Pointer(&y[0])), C.blasint(incY)))
81 | }
82 |
83 | // CdotuSub returns the dot product of two complex single-precision vectors and stores the result in ret.
84 | func CdotuSub(n int, x []complex64, incX int, y []complex64, incY int, ret *complex64) {
85 | C.cblas_cdotu_sub(C.blasint(n), unsafe.Pointer(&x[0]), C.blasint(incX), unsafe.Pointer(&y[0]), C.blasint(incY), unsafe.Pointer(ret))
86 | }
87 |
88 | // CdotcSub returns the dot product of two complex single-precision vectors conjugating the first and stores the result in ret.
89 | func CdotcSub(n int, x []complex64, incX int, y []complex64, incY int, ret *complex64) {
90 | C.cblas_cdotc_sub(C.blasint(n), unsafe.Pointer(&x[0]), C.blasint(incX), unsafe.Pointer(&y[0]), C.blasint(incY), unsafe.Pointer(ret))
91 | }
92 |
93 | // ZdotuSub returns the dot product of two complex double-precision vectors and stores the result in ret.
94 | func ZdotuSub(n int, x []complex128, incX int, y []complex128, incY int, ret *complex128) {
95 | C.cblas_zdotu_sub(C.blasint(n), unsafe.Pointer(&x[0]), C.blasint(incX), unsafe.Pointer(&y[0]), C.blasint(incY), unsafe.Pointer(ret))
96 | }
97 |
98 | // ZdotcSub returns the dot product of two complex double-precision vectors conjugating the first and stores the result in ret.
99 | func ZdotcSub(n int, x []complex128, incX int, y []complex128, incY int, ret *complex128) {
100 | C.cblas_zdotc_sub(C.blasint(n), unsafe.Pointer(&x[0]), C.blasint(incX), unsafe.Pointer(&y[0]), C.blasint(incY), unsafe.Pointer(ret))
101 | }
102 |
103 | // Sasum returns the sum of the absolute values of a single-precision vector.
104 | func Sasum(n int, x []float32, incX int) float32 {
105 | return float32(C.cblas_sasum(C.blasint(n), (*C.float)(unsafe.Pointer(&x[0])), C.blasint(incX)))
106 | }
107 |
108 | // Dasum returns the sum of the absolute values of a double-precision vector.
109 | func Dasum(n int, x []float64, incX int) float64 {
110 | return float64(C.cblas_dasum(C.blasint(n), (*C.double)(unsafe.Pointer(&x[0])), C.blasint(incX)))
111 | }
112 |
113 | // Scasum returns the sum of the absolute values of the real and imaginary components of a complex single-precision vector.
114 | func Scasum(n int, x []complex64, incX int) float32 {
115 | return float32(C.cblas_scasum(C.blasint(n), unsafe.Pointer(&x[0]), C.blasint(incX)))
116 | }
117 |
118 | // Dzasum returns the sum of the absolute values of the real and imaginary components of a complex double-precision vector.
119 | func Dzasum(n int, x []complex128, incX int) float64 {
120 | return float64(C.cblas_dzasum(C.blasint(n), unsafe.Pointer(&x[0]), C.blasint(incX)))
121 | }
122 |
123 | // Ssum returns the sum of a single-precision vector.
124 | func Ssum(n int, x []float32, incX int) float32 {
125 | return float32(C.cblas_ssum(C.blasint(n), (*C.float)(unsafe.Pointer(&x[0])), C.blasint(incX)))
126 | }
127 |
128 | // Dsum returns the sum of a double-precision vector.
129 | func Dsum(n int, x []float64, incX int) float64 {
130 | return float64(C.cblas_dsum(C.blasint(n), (*C.double)(unsafe.Pointer(&x[0])), C.blasint(incX)))
131 | }
132 |
133 | // Scsum returns the sum of the real and imaginary components of a complex single-precision vector.
134 | func Scsum(n int, x []complex64, incX int) float32 {
135 | return float32(C.cblas_scsum(C.blasint(n), unsafe.Pointer(&x[0]), C.blasint(incX)))
136 | }
137 |
138 | // Dzsum returns the sum of the real and imaginary components of a complex double-precision vector.
139 | func Dzsum(n int, x []complex128, incX int) float64 {
140 | return float64(C.cblas_dzsum(C.blasint(n), unsafe.Pointer(&x[0]), C.blasint(incX)))
141 | }
142 |
143 | // Snrm2 returns the Euclidean norm (2-norm) of a single-precision vector.
144 | func Snrm2(N int, X []float32, incX int) float32 {
145 | return float32(C.cblas_snrm2(C.blasint(N), (*C.float)(unsafe.Pointer(&X[0])), C.blasint(incX)))
146 | }
147 |
148 | // Dnrm2 returns the Euclidean norm (2-norm) of a double-precision vector.
149 | func Dnrm2(N int, X []float64, incX int) float64 {
150 | return float64(C.cblas_dnrm2(C.blasint(N), (*C.double)(unsafe.Pointer(&X[0])), C.blasint(incX)))
151 | }
152 |
153 | // Scnrm2 returns the Euclidean norm (2-norm) of a complex single-precision vector.
154 | func Scnrm2(N int, X []complex64, incX int) float32 {
155 | return float32(C.cblas_scnrm2(C.blasint(N), unsafe.Pointer(&X[0]), C.blasint(incX)))
156 | }
157 |
158 | // Dznrm2 returns the Euclidean norm (2-norm) of a complex double-precision vector.
159 | func Dznrm2(N int, X []complex128, incX int) float64 {
160 | return float64(C.cblas_dznrm2(C.blasint(N), unsafe.Pointer(&X[0]), C.blasint(incX)))
161 | }
162 |
163 | // Isamax returns the index of the element with the largest absolute value in a single-precision vector.
164 | func Isamax(n int, x []float32, incx int) int {
165 | return int(C.cblas_isamax(C.blasint(n), (*C.float)(unsafe.Pointer(&x[0])), C.blasint(incx)))
166 | }
167 |
168 | // Idamax returns the index of the element with the largest absolute value in a double-precision vector.
169 | func Idamax(n int, x []float64, incx int) int {
170 | return int(C.cblas_idamax(C.blasint(n), (*C.double)(unsafe.Pointer(&x[0])), C.blasint(incx)))
171 | }
172 |
173 | // Icamax returns the index of the element with the largest absolute value in a complex single-precision vector.
174 | func Icamax(n int, x []complex64, incx int) int {
175 | return int(C.cblas_icamax(C.blasint(n), unsafe.Pointer(&x[0]), C.blasint(incx)))
176 | }
177 |
178 | // Izamax returns the index of the element with the largest absolute value in a complex double-precision vector.
179 | func Izamax(n int, x []complex128, incx int) int {
180 | return int(C.cblas_izamax(C.blasint(n), unsafe.Pointer(&x[0]), C.blasint(incx)))
181 | }
182 |
183 | // Isamin returns the index of the element with the smallest absolute value in a single-precision vector.
184 | func Isamin(n int, x []float32, incx int) int {
185 | return int(C.cblas_isamin(C.blasint(n), (*C.float)(unsafe.Pointer(&x[0])), C.blasint(incx)))
186 | }
187 |
188 | // Idamin returns the index of the element with the smallest absolute value in a double-precision vector.
189 | func Idamin(n int, x []float64, incx int) int {
190 | return int(C.cblas_idamin(C.blasint(n), (*C.double)(unsafe.Pointer(&x[0])), C.blasint(incx)))
191 | }
192 |
193 | // Icamin returns the index of the element with the smallest absolute value in a complex single-precision vector.
194 | func Icamin(n int, x []complex64, incx int) int {
195 | return int(C.cblas_icamin(C.blasint(n), unsafe.Pointer(&x[0]), C.blasint(incx)))
196 | }
197 |
198 | // Izamin returns the index of the element with the smallest absolute value in a complex double-precision vector.
199 | func Izamin(n int, x []complex128, incx int) int {
200 | return int(C.cblas_izamin(C.blasint(n), unsafe.Pointer(&x[0]), C.blasint(incx)))
201 | }
202 |
203 | // Ismax returns the index of the element with the largest absolute value in a single-precision vector.
204 | func Ismax(n int, x []float32, incx int) int {
205 | return int(C.cblas_ismax(C.blasint(n), (*C.float)(unsafe.Pointer(&x[0])), C.blasint(incx)))
206 | }
207 |
208 | // Idmax returns the index of the element with the largest absolute value in a double-precision vector.
209 | func Idmax(n int, x []float64, incx int) int {
210 | return int(C.cblas_idmax(C.blasint(n), (*C.double)(unsafe.Pointer(&x[0])), C.blasint(incx)))
211 | }
212 |
213 | // Icmax returns the index of the element with the largest absolute value in a complex single-precision vector.
214 | func Icmax(n int, x []complex64, incx int) int {
215 | return int(C.cblas_icmax(C.blasint(n), unsafe.Pointer(&x[0]), C.blasint(incx)))
216 | }
217 |
218 | // Izmax returns the index of the element with the largest absolute value in a complex double-precision vector.
219 | func Izmax(n int, x []complex128, incx int) int {
220 | return int(C.cblas_izmax(C.blasint(n), unsafe.Pointer(&x[0]), C.blasint(incx)))
221 | }
222 |
223 | // Ismin returns the index of the element with the smallest value in a single-precision vector.
224 | func Ismin(n int, x []float32, incx int) int {
225 | return int(C.cblas_ismin(C.blasint(n), (*C.float)(unsafe.Pointer(&x[0])), C.blasint(incx)))
226 | }
227 |
228 | // Idmin returns the index of the element with the smallest value in a double-precision vector.
229 | func Idmin(n int, x []float64, incx int) int {
230 | return int(C.cblas_idmin(C.blasint(n), (*C.double)(unsafe.Pointer(&x[0])), C.blasint(incx)))
231 | }
232 |
233 | // Icmin returns the index of the element with the smallest value in a complex single-precision vector.
234 | func Icmin(n int, x []complex64, incx int) int {
235 | return int(C.cblas_icmin(C.blasint(n), unsafe.Pointer(&x[0]), C.blasint(incx)))
236 | }
237 |
238 | // Izmin returns the index of the element with the smallest value in a complex double-precision vector.
239 | func Izmin(n int, x []complex128, incx int) int {
240 | return int(C.cblas_izmin(C.blasint(n), unsafe.Pointer(&x[0]), C.blasint(incx)))
241 | }
242 |
243 | // Saxpy adds a multiple of a single-precision vector to another single-precision vector.
244 | func Saxpy(n int, alpha float32, x []float32, incx int, y []float32, incy int) {
245 | C.cblas_saxpy(C.blasint(n), C.float(alpha), (*C.float)(unsafe.Pointer(&x[0])), C.blasint(incx), (*C.float)(unsafe.Pointer(&y[0])), C.blasint(incy))
246 | }
247 |
248 | // Daxpy adds a multiple of a double-precision vector to another double-precision vector.
249 | func Daxpy(n int, alpha float64, x []float64, incx int, y []float64, incy int) {
250 | C.cblas_daxpy(C.blasint(n), C.double(alpha), (*C.double)(unsafe.Pointer(&x[0])), C.blasint(incx), (*C.double)(unsafe.Pointer(&y[0])), C.blasint(incy))
251 | }
252 |
253 | // Caxpy adds a multiple of a complex single-precision vector to another complex single-precision vector.
254 | func Caxpy(n int, alpha complex64, x []complex64, incx int, y []complex64, incy int) {
255 | C.cblas_caxpy(C.blasint(n), unsafe.Pointer(&alpha), unsafe.Pointer(&x[0]), C.blasint(incx), unsafe.Pointer(&y[0]), C.blasint(incy))
256 | }
257 |
258 | // Zaxpy adds a multiple of a complex double-precision vector to another complex double-precision vector.
259 | func Zaxpy(n int, alpha complex128, x []complex128, incx int, y []complex128, incy int) {
260 | C.cblas_zaxpy(C.blasint(n), unsafe.Pointer(&alpha), unsafe.Pointer(&x[0]), C.blasint(incx), unsafe.Pointer(&y[0]), C.blasint(incy))
261 | }
262 |
263 | // Scopy copies a single-precision vector x to a single-precision vector y.
264 | func Scopy(n int, x []float32, incx int, y []float32, incy int) {
265 | C.cblas_scopy(C.blasint(n), (*C.float)(unsafe.Pointer(&x[0])), C.blasint(incx), (*C.float)(unsafe.Pointer(&y[0])), C.blasint(incy))
266 | }
267 |
268 | // Dcopy copies a double-precision vector x to a double-precision vector y.
269 | func Dcopy(n int, x []float64, incx int, y []float64, incy int) {
270 | C.cblas_dcopy(C.blasint(n), (*C.double)(unsafe.Pointer(&x[0])), C.blasint(incx), (*C.double)(unsafe.Pointer(&y[0])), C.blasint(incy))
271 | }
272 |
273 | // Ccopy copies a complex single-precision vector x to a complex single-precision vector y.
274 | func Ccopy(n int, x []complex64, incx int, y []complex64, incy int) {
275 | C.cblas_ccopy(C.blasint(n), unsafe.Pointer(&x[0]), C.blasint(incx), unsafe.Pointer(&y[0]), C.blasint(incy))
276 | }
277 |
278 | // Zcopy copies a complex double-precision vector x to a complex double-precision vector y.
279 | func Zcopy(n int, x []complex128, incx int, y []complex128, incy int) {
280 | C.cblas_zcopy(C.blasint(n), unsafe.Pointer(&x[0]), C.blasint(incx), unsafe.Pointer(&y[0]), C.blasint(incy))
281 | }
282 |
283 | // Sswap interchanges two single-precision vectors.
284 | func Sswap(n int, x []float32, incx int, y []float32, incy int) {
285 | C.cblas_sswap(C.blasint(n), (*C.float)(unsafe.Pointer(&x[0])), C.blasint(incx), (*C.float)(unsafe.Pointer(&y[0])), C.blasint(incy))
286 | }
287 |
288 | // Dswap interchanges two double-precision vectors.
289 | func Dswap(n int, x []float64, incx int, y []float64, incy int) {
290 | C.cblas_dswap(C.blasint(n), (*C.double)(unsafe.Pointer(&x[0])), C.blasint(incx), (*C.double)(unsafe.Pointer(&y[0])), C.blasint(incy))
291 | }
292 |
293 | // Cswap interchanges two complex single-precision vectors.
294 | func Cswap(n int, x []complex64, incx int, y []complex64, incy int) {
295 | C.cblas_cswap(C.blasint(n), unsafe.Pointer(&x[0]), C.blasint(incx), unsafe.Pointer(&y[0]), C.blasint(incy))
296 | }
297 |
298 | // Zswap interchanges two complex double-precision vectors.
299 | func Zswap(n int, x []complex128, incx int, y []complex128, incy int) {
300 | C.cblas_zswap(C.blasint(n), unsafe.Pointer(&x[0]), C.blasint(incx), unsafe.Pointer(&y[0]), C.blasint(incy))
301 | }
302 |
303 | // Srot applies a plane rotation to vectors x and y.
304 | func Srot(n int, x []float32, incX int, y []float32, incY int, c float32, s float32) {
305 | C.cblas_srot(C.blasint(n), (*C.float)(unsafe.Pointer(&x[0])), C.blasint(incX), (*C.float)(unsafe.Pointer(&y[0])), C.blasint(incY), C.float(c), C.float(s))
306 | }
307 |
308 | // Drot applies a plane rotation to vectors x and y.
309 | func Drot(n int, x []float64, incX int, y []float64, incY int, c float64, s float64) {
310 | C.cblas_drot(C.blasint(n), (*C.double)(unsafe.Pointer(&x[0])), C.blasint(incX), (*C.double)(unsafe.Pointer(&y[0])), C.blasint(incY), C.double(c), C.double(s))
311 | }
312 |
313 | // Csrot applies a plane rotation to complex single-precision vectors x and y.
314 | func Csrot(n int, x []complex64, incX int, y []complex64, incY int, c float32, s float32) {
315 | //C.cblas_csrot(C.blasint(n), unsafe.Pointer(&x[0]), C.blasint(incX), unsafe.Pointer(&y[0]), C.blasint(incY), C.float(c), C.float(s))
316 | }
317 |
318 | // Zdrot applies a plane rotation to complex double-precision vectors x and y.
319 | func Zdrot(n int, x []complex128, incX int, y []complex128, incY int, c float64, s float64) {
320 | //C.cblas_zdrot(C.blasint(n), unsafe.Pointer(&x[0]), C.blasint(incX), unsafe.Pointer(&y[0]), C.blasint(incY), C.double(c), C.double(s))
321 | }
322 |
323 | // cblas_srotg computes the parameters for a Givens rotation matrix.
324 | func Srotg(a *float32, b *float32, c *float32, s *float32) {
325 | C.cblas_srotg((*C.float)(unsafe.Pointer(a)), (*C.float)(unsafe.Pointer(b)), (*C.float)(unsafe.Pointer(c)), (*C.float)(unsafe.Pointer(s)))
326 | }
327 |
328 | // cblas_drotg computes the parameters for a Givens rotation matrix.
329 | func Drotg(a *float64, b *float64, c *float64, s *float64) {
330 | C.cblas_drotg((*C.double)(unsafe.Pointer(a)), (*C.double)(unsafe.Pointer(b)), (*C.double)(unsafe.Pointer(c)), (*C.double)(unsafe.Pointer(s)))
331 | }
332 |
333 | // cblas_crotg computes the parameters for a Givens rotation matrix.
334 | func Crotg(a *complex64, b *complex64, c *float32, s *complex64) {
335 | // FIXME: No symbol
336 | //C.cblas_crotg(unsafe.Pointer(a), unsafe.Pointer(b), (*C.float)(unsafe.Pointer(c)), unsafe.Pointer(s))
337 | }
338 |
339 | // cblas_zrotg computes the parameters for a Givens rotation matrix.
340 | func Zrotg(a *complex128, b *complex128, c *float64, s *complex128) {
341 | // FIXME: No symbol
342 | //C.cblas_zrotg(unsafe.Pointer(a), unsafe.Pointer(b), (*C.double)(unsafe.Pointer(c)), unsafe.Pointer(s))
343 | }
344 |
345 | // Rotates the points (X,Y) in the plane through the angle THETA.
346 | func Srotm(n int32, x []float32, incX int32, y []float32, incY int32, p []float32) {
347 | C.cblas_srotm(C.blasint(n), (*C.float)(unsafe.Pointer(&x[0])), C.blasint(incX), (*C.float)(unsafe.Pointer(&y[0])), C.blasint(incY), (*C.float)(unsafe.Pointer(&p[0])))
348 | }
349 |
350 | // Rotates the points (X,Y) in the plane through the angle THETA.
351 | func Drotm(n int32, x []float64, incX int32, y []float64, incY int32, p []float64) {
352 | C.cblas_drotm(C.blasint(n), (*C.double)(unsafe.Pointer(&x[0])), C.blasint(incX), (*C.double)(unsafe.Pointer(&y[0])), C.blasint(incY), (*C.double)(unsafe.Pointer(&p[0])))
353 | }
354 |
355 | // Given the scalars d1, d2, and b2, constructs the modified Givens transformation matrix H which zeros the second component of the 2-vector transpose(d1,d2)
356 | func Srotmg(d1, d2, b1 *float32, b2 float32, p []float32) {
357 | C.cblas_srotmg((*C.float)(d1), (*C.float)(d2), (*C.float)(b1), C.float(b2), (*C.float)(unsafe.Pointer(&p[0])))
358 | }
359 |
360 | // Given the scalars d1, d2, and b2, constructs the modified Givens transformation matrix H which zeros the second component of the 2-vector transpose(d1,d2)
361 | func Drotmg(d1, d2, b1 *float64, b2 float64, p []float64) {
362 | C.cblas_drotmg((*C.double)(d1), (*C.double)(d2), (*C.double)(b1), C.double(b2), (*C.double)(unsafe.Pointer(&p[0])))
363 | }
364 |
365 | // Scalar multiplication of a single-precision float vector X by a scalar alpha.
366 | func Sscal(n int, alpha float32, x []float32, incX int) {
367 | C.cblas_sscal(C.blasint(n), C.float(alpha), (*C.float)(unsafe.Pointer(&x[0])), C.blasint(incX))
368 | }
369 |
370 | // Scalar multiplication of a double-precision float vector X by a scalar alpha.
371 | func Dscal(n int, alpha float64, x []float64, incX int) {
372 | C.cblas_dscal(C.blasint(n), C.double(alpha), (*C.double)(unsafe.Pointer(&x[0])), C.blasint(incX))
373 | }
374 |
375 | // Scalar multiplication of a complex single-precision float vector X by a complex scalar alpha.
376 | func Cscal(n int, alpha complex64, x []complex64, incX int) {
377 | C.cblas_cscal(C.blasint(n), (unsafe.Pointer(&alpha)), unsafe.Pointer(&x[0]), C.blasint(incX))
378 | }
379 |
380 | // Scalar multiplication of a complex double-precision float vector X by a complex scalar alpha.
381 | func Zscal(n int, alpha complex128, x []complex128, incX int) {
382 | C.cblas_zscal(C.blasint(n), (unsafe.Pointer(&alpha)), unsafe.Pointer(&x[0]), C.blasint(incX))
383 | }
384 |
385 | // Scalar multiplication of a complex single-precision float vector X by a real scalar alpha.
386 | func Csscal(n int, alpha float32, x []complex64, incX int) {
387 | C.cblas_csscal(C.blasint(n), C.float(alpha), unsafe.Pointer(&x[0]), C.blasint(incX))
388 | }
389 |
390 | // Scalar multiplication of a complex double-precision float vector X by a real scalar alpha.
391 | func Zdscal(n int, alpha float64, x []complex128, incX int) {
392 | C.cblas_zdscal(C.blasint(n), C.double(alpha), unsafe.Pointer(&x[0]), C.blasint(incX))
393 | }
394 |
395 | // Sgemv performs a matrix-vector operation with a general rectangular matrix, for real single precision elements.
396 | func Sgemv(order Order, trans Transpose, m, n int, alpha float32, a []float32, lda int, x []float32, incx int, beta float32, y []float32, incy int) {
397 | C.cblas_sgemv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_TRANSPOSE(trans), C.blasint(m), C.blasint(n), C.float(alpha), (*C.float)(unsafe.Pointer(&a[0])), C.blasint(lda), (*C.float)(unsafe.Pointer(&x[0])), C.blasint(incx), C.float(beta), (*C.float)(unsafe.Pointer(&y[0])), C.blasint(incy))
398 | }
399 |
400 | // Dgemv performs a matrix-vector operation with a general rectangular matrix, for real double precision elements.
401 | func Dgemv(order Order, trans Transpose, m, n int, alpha float64, a []float64, lda int, x []float64, incx int, beta float64, y []float64, incy int) {
402 | C.cblas_dgemv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_TRANSPOSE(trans), C.blasint(m), C.blasint(n), C.double(alpha), (*C.double)(unsafe.Pointer(&a[0])), C.blasint(lda), (*C.double)(unsafe.Pointer(&x[0])), C.blasint(incx), C.double(beta), (*C.double)(unsafe.Pointer(&y[0])), C.blasint(incy))
403 | }
404 |
405 | // Cgemv performs a matrix-vector operation with a general rectangular matrix, for complex single precision elements.
406 | func Cgemv(order Order, trans Transpose, m, n int, alpha complex64, a []complex64, lda int, x []complex64, incx int, beta complex64, y []complex64, incy int) {
407 | C.cblas_cgemv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_TRANSPOSE(trans), C.blasint(m), C.blasint(n), unsafe.Pointer(&alpha), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&x[0]), C.blasint(incx), unsafe.Pointer(&beta), unsafe.Pointer(&y[0]), C.blasint(incy))
408 | }
409 |
410 | // Zgemv performs a matrix-vector operation with a general rectangular matrix, for complex double precision elements.
411 | func Zgemv(order Order, trans Transpose, m, n int, alpha complex128, a []complex128, lda int, x []complex128, incx int, beta complex128, y []complex128, incy int) {
412 | C.cblas_zgemv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_TRANSPOSE(trans), C.blasint(m), C.blasint(n), unsafe.Pointer(&alpha), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&x[0]), C.blasint(incx), unsafe.Pointer(&beta), unsafe.Pointer(&y[0]), C.blasint(incy))
413 | }
414 |
415 | // Sger performs a rank-1 update of matrix A. A = alpha * X * Y^T + A
416 | func Sger(order Order, m, n int, alpha float32, x []float32, incX int, y []float32, incY int, a []float32, lda int) {
417 | C.cblas_sger(C.enum_CBLAS_ORDER(order), C.blasint(m), C.blasint(n), C.float(alpha), (*C.float)(unsafe.Pointer(&x[0])), C.blasint(incX), (*C.float)(unsafe.Pointer(&y[0])), C.blasint(incY), (*C.float)(unsafe.Pointer(&a[0])), C.blasint(lda))
418 | }
419 |
420 | // Dger performs a rank-1 update of matrix A. A = alpha * X * Y^T + A
421 | func Dger(order Order, m, n int, alpha float64, x []float64, incX int, y []float64, incY int, a []float64, lda int) {
422 | C.cblas_dger(C.enum_CBLAS_ORDER(order), C.blasint(m), C.blasint(n), C.double(alpha), (*C.double)(unsafe.Pointer(&x[0])), C.blasint(incX), (*C.double)(unsafe.Pointer(&y[0])), C.blasint(incY), (*C.double)(unsafe.Pointer(&a[0])), C.blasint(lda))
423 | }
424 |
425 | // Cgeru performs a rank-1 update of matrix A. A = alpha * X * Y^H + A
426 | func Cgeru(order Order, m, n int, alpha complex64, x []complex64, incX int, y []complex64, incY int, a []complex64, lda int) {
427 | C.cblas_cgeru(C.enum_CBLAS_ORDER(order), C.blasint(m), C.blasint(n), unsafe.Pointer(&alpha), unsafe.Pointer(&x[0]), C.blasint(incX), unsafe.Pointer(&y[0]), C.blasint(incY), unsafe.Pointer(&a[0]), C.blasint(lda))
428 | }
429 |
430 | // Cgerc performs a rank-1 update of matrix A. A = alpha * X * conj(Y)^T + A
431 | func Cgerc(order Order, m, n int, alpha complex64, x []complex64, incX int, y []complex64, incY int, a []complex64, lda int) {
432 | C.cblas_cgerc(C.enum_CBLAS_ORDER(order), C.blasint(m), C.blasint(n), unsafe.Pointer(&alpha), unsafe.Pointer(&x[0]), C.blasint(incX), unsafe.Pointer(&y[0]), C.blasint(incY), unsafe.Pointer(&a[0]), C.blasint(lda))
433 | }
434 |
435 | // Zgeru performs a rank-1 update of matrix A. A = alpha * X * Y^H + A
436 | func Zgeru(order Order, m, n int, alpha complex128, x []complex128, incX int, y []complex128, incY int, a []complex128, lda int) {
437 | C.cblas_zgeru(C.enum_CBLAS_ORDER(order), C.blasint(m), C.blasint(n), unsafe.Pointer(&alpha), unsafe.Pointer(&x[0]), C.blasint(incX), unsafe.Pointer(&y[0]), C.blasint(incY), unsafe.Pointer(&a[0]), C.blasint(lda))
438 | }
439 |
440 | // Zgerc performs a rank-1 update of matrix A. A = alpha * X * conj(Y)^T + A
441 | func Zgerc(order Order, m, n int, alpha complex128, x []complex128, incX int, y []complex128, incY int, a []complex128, lda int) {
442 | C.cblas_zgerc(C.enum_CBLAS_ORDER(order), C.blasint(m), C.blasint(n), unsafe.Pointer(&alpha), unsafe.Pointer(&x[0]), C.blasint(incX), unsafe.Pointer(&y[0]), C.blasint(incY), unsafe.Pointer(&a[0]), C.blasint(lda))
443 | }
444 |
445 | // Strsv solves a system of linear equations with a triangular matrix stored in packed format.
446 | func Strsv(order Order, upLo UpLo, trans Transpose, diag Diag, n int, a []float32, lda int, x []float32, incX int) {
447 | C.cblas_strsv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.enum_CBLAS_DIAG(diag),
448 | C.blasint(n), (*C.float)(unsafe.Pointer(&a[0])), C.blasint(lda), (*C.float)(unsafe.Pointer(&x[0])), C.blasint(incX))
449 | }
450 |
451 | // Dtrsv solves a system of linear equations with a triangular matrix stored in packed format.
452 | func Dtrsv(order Order, upLo UpLo, trans Transpose, diag Diag, n int, a []float64, lda int, x []float64, incX int) {
453 | C.cblas_dtrsv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.enum_CBLAS_DIAG(diag),
454 | C.blasint(n), (*C.double)(unsafe.Pointer(&a[0])), C.blasint(lda), (*C.double)(unsafe.Pointer(&x[0])), C.blasint(incX))
455 | }
456 |
457 | // Ctrsv solves a system of linear equations with a triangular matrix stored in packed format.
458 | func Ctrsv(order Order, upLo UpLo, trans Transpose, diag Diag, n int, a []complex64, lda int, x []complex64, incX int) {
459 | C.cblas_ctrsv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.enum_CBLAS_DIAG(diag),
460 | C.blasint(n), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&x[0]), C.blasint(incX))
461 | }
462 |
463 | // Ztrsv solves a system of linear equations with a triangular matrix stored in packed format.
464 | func Ztrsv(order Order, upLo UpLo, trans Transpose, diag Diag, n int, a []complex128, lda int, x []complex128, incX int) {
465 | C.cblas_ztrsv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.enum_CBLAS_DIAG(diag),
466 | C.blasint(n), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&x[0]), C.blasint(incX))
467 | }
468 |
469 | // Strmv performs one of the matrix-vector operations x = A*x or x = Aᵀ*x where A is a triangular matrix.
470 | func Strmv(order Order, upLo UpLo, trans Transpose, diag Diag, n int, a []float32, lda int, x []float32, incX int) {
471 | C.cblas_strmv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.enum_CBLAS_DIAG(diag), C.blasint(n), (*C.float)(unsafe.Pointer(&a[0])), C.blasint(lda), (*C.float)(unsafe.Pointer(&x[0])), C.blasint(incX))
472 | }
473 |
474 | // Dtrmv performs one of the matrix-vector operations x = A*x or x = Aᵀ*x where A is a triangular matrix.
475 | func Dtrmv(order Order, upLo UpLo, trans Transpose, diag Diag, n int, a []float64, lda int, x []float64, incX int) {
476 | C.cblas_dtrmv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.enum_CBLAS_DIAG(diag), C.blasint(n), (*C.double)(unsafe.Pointer(&a[0])), C.blasint(lda), (*C.double)(unsafe.Pointer(&x[0])), C.blasint(incX))
477 | }
478 |
479 | // Ctrmv performs one of the matrix-vector operations x = A*x or x = Aᵀ*x where A is a triangular matrix.
480 | func Ctrmv(order Order, upLo UpLo, trans Transpose, diag Diag, n int, a []complex64, lda int, x []complex64, incX int) {
481 | C.cblas_ctrmv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.enum_CBLAS_DIAG(diag), C.blasint(n), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&x[0]), C.blasint(incX))
482 | }
483 |
484 | // Ztrmv performs one of the matrix-vector operations x = A*x or x = Aᵀ*x where A is a triangular matrix.
485 | func Ztrmv(order Order, upLo UpLo, trans Transpose, diag Diag, n int, a []complex128, lda int, x []complex128, incX int) {
486 | C.cblas_ztrmv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.enum_CBLAS_DIAG(diag), C.blasint(n), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&x[0]), C.blasint(incX))
487 | }
488 |
489 | // Ssyr performs a symmetric rank-1 update of a real symmetric matrix.
490 | func Ssyr(order Order, upLo UpLo, n int, alpha float32, x []float32, incX int, a []float32, lda int) {
491 | C.cblas_ssyr(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.blasint(n), C.float(alpha), (*C.float)(unsafe.Pointer(&x[0])), C.blasint(incX), (*C.float)(unsafe.Pointer(&a[0])), C.blasint(lda))
492 | }
493 |
494 | // Dsyr performs a symmetric rank-1 update of a real symmetric matrix.
495 | func Dsyr(order Order, upLo UpLo, n int, alpha float64, x []float64, incX int, a []float64, lda int) {
496 | C.cblas_dsyr(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.blasint(n), C.double(alpha), (*C.double)(unsafe.Pointer(&x[0])), C.blasint(incX), (*C.double)(unsafe.Pointer(&a[0])), C.blasint(lda))
497 | }
498 |
499 | // Cher performs a hermitian rank-1 update of a complex hermitian matrix.
500 | func Cher(order Order, upLo UpLo, n int, alpha float32, x []complex64, incX int, a []complex64, lda int) {
501 | C.cblas_cher(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.blasint(n), C.float(alpha), unsafe.Pointer(&x[0]), C.blasint(incX), unsafe.Pointer(&a[0]), C.blasint(lda))
502 | }
503 |
504 | // Zher performs a hermitian rank-1 update of a complex hermitian matrix.
505 | func Zher(order Order, upLo UpLo, n int, alpha float64, x []complex128, incX int, a []complex128, lda int) {
506 | C.cblas_zher(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.blasint(n), C.double(alpha), unsafe.Pointer(&x[0]), C.blasint(incX), unsafe.Pointer(&a[0]), C.blasint(lda))
507 | }
508 |
509 | // Ssyr2 performs the symmetric rank 2 operation A := alpha*x*y^T + alpha*y*x^T + A, where alpha is a scalar, x and y are n element vectors, and A is an n by n symmetric matrix, supplied in packed form.
510 | func Ssyr2(order Order, upLo UpLo, n int, alpha float32, x []float32, incX int, y []float32, incY int, a []float32, lda int) {
511 | C.cblas_ssyr2(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.blasint(n), C.float(alpha), (*C.float)(unsafe.Pointer(&x[0])), C.blasint(incX), (*C.float)(unsafe.Pointer(&y[0])), C.blasint(incY), (*C.float)(unsafe.Pointer(&a[0])), C.blasint(lda))
512 | }
513 |
514 | // Dsyr2 performs the symmetric rank 2 operation A := alpha*x*y^T + alpha*y*x^T + A, where alpha is a scalar, x and y are n element vectors, and A is an n by n symmetric matrix, supplied in packed form.
515 | func Dsyr2(order Order, upLo UpLo, n int, alpha float64, x []float64, incX int, y []float64, incY int, a []float64, lda int) {
516 | C.cblas_dsyr2(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.blasint(n), C.double(alpha), (*C.double)(unsafe.Pointer(&x[0])), C.blasint(incX), (*C.double)(unsafe.Pointer(&y[0])), C.blasint(incY), (*C.double)(unsafe.Pointer(&a[0])), C.blasint(lda))
517 | }
518 |
519 | // Cher2 performs the Hermitian rank-2 update
520 | func Cher2(order Order, upLo UpLo, n int, alpha complex64, x []complex64, incX int, y []complex64, incY int, a []complex64, lda int) {
521 | C.cblas_cher2(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.blasint(n), unsafe.Pointer(&alpha), unsafe.Pointer(&x[0]), C.blasint(incX), unsafe.Pointer(&y[0]), C.blasint(incY), unsafe.Pointer(&a[0]), C.blasint(lda))
522 | }
523 |
524 | // Zher2 performs the Hermitian rank-2 update
525 | func Zher2(order Order, upLo UpLo, n int, alpha complex128, x []complex128, incX int, y []complex128, incY int, a []complex128, lda int) {
526 | C.cblas_zher2(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.blasint(n), unsafe.Pointer(&alpha), unsafe.Pointer(&x[0]), C.blasint(incX), unsafe.Pointer(&y[0]), C.blasint(incY), unsafe.Pointer(&a[0]), C.blasint(lda))
527 | }
528 |
529 | // Sgbmv applies a general banded matrix to a vector (single precision).
530 | func Sgbmv(order Order, transA Transpose, m int, n int, kl int, ku int, alpha float32, a []float32, lda int, x []float32, incX int, beta float32, y []float32, incY int) {
531 | C.cblas_sgbmv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_TRANSPOSE(transA), C.blasint(m), C.blasint(n), C.blasint(kl), C.blasint(ku), C.float(alpha), (*C.float)(unsafe.Pointer(&a[0])), C.blasint(lda), (*C.float)(unsafe.Pointer(&x[0])), C.blasint(incX), C.float(beta), (*C.float)(unsafe.Pointer(&y[0])), C.blasint(incY))
532 | }
533 |
534 | // Dgbmv applies a general banded matrix to a vector (double precision).
535 | func Dgbmv(order Order, transA Transpose, m int, n int, kl int, ku int, alpha float64, a []float64, lda int, x []float64, incX int, beta float64, y []float64, incY int) {
536 | C.cblas_dgbmv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_TRANSPOSE(transA), C.blasint(m), C.blasint(n), C.blasint(kl), C.blasint(ku), C.double(alpha), (*C.double)(unsafe.Pointer(&a[0])), C.blasint(lda), (*C.double)(unsafe.Pointer(&x[0])), C.blasint(incX), C.double(beta), (*C.double)(unsafe.Pointer(&y[0])), C.blasint(incY))
537 | }
538 |
539 | // Cgbmv applies a general banded matrix to a vector (single precision).
540 | func Cgbmv(order Order, transA Transpose, m int, n int, kl int, ku int, alpha complex64, a []complex64, lda int, x []complex64, incX int, beta complex64, y []complex64, incY int) {
541 | C.cblas_cgbmv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_TRANSPOSE(transA), C.blasint(m), C.blasint(n), C.blasint(kl), C.blasint(ku), unsafe.Pointer(&alpha), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&x[0]), C.blasint(incX), unsafe.Pointer(&beta), unsafe.Pointer(&y[0]), C.blasint(incY))
542 | }
543 |
544 | // Zgbmv applies a general banded matrix to a vector (double precision).
545 | func Zgbmv(order Order, transA Transpose, m int, n int, kl int, ku int, alpha complex128, a []complex128, lda int, x []complex128, incX int, beta complex128, y []complex128, incY int) {
546 | C.cblas_zgbmv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_TRANSPOSE(transA), C.blasint(m), C.blasint(n), C.blasint(kl), C.blasint(ku), unsafe.Pointer(&alpha), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&x[0]), C.blasint(incX), unsafe.Pointer(&beta), unsafe.Pointer(&y[0]), C.blasint(incY))
547 | }
548 |
549 | // Ssbmv computes the matrix-vector product using a symmetric band matrix.
550 | func Ssbmv(order Order, upLo UpLo, n, k int, alpha float32, a []float32, lda int, x []float32, incX int, beta float32, y []float32, incY int) {
551 | C.cblas_ssbmv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.blasint(n), C.blasint(k), C.float(alpha), (*C.float)(unsafe.Pointer(&a[0])), C.blasint(lda), (*C.float)(unsafe.Pointer(&x[0])), C.blasint(incX), C.float(beta), (*C.float)(unsafe.Pointer(&y[0])), C.blasint(incY))
552 | }
553 |
554 | // Dsbmv computes the matrix-vector product using a symmetric band matrix.
555 | func Dsbmv(order Order, upLo UpLo, n, k int, alpha float64, a []float64, lda int, x []float64, incX int, beta float64, y []float64, incY int) {
556 | C.cblas_dsbmv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.blasint(n), C.blasint(k), C.double(alpha), (*C.double)(unsafe.Pointer(&a[0])), C.blasint(lda), (*C.double)(unsafe.Pointer(&x[0])), C.blasint(incX), C.double(beta), (*C.double)(unsafe.Pointer(&y[0])), C.blasint(incY))
557 | }
558 |
559 | // Stbmv multiplies a triangular banded matrix with a vector.
560 | func Stbmv(order Order, upLo UpLo, trans Transpose, diag Diag, n, k int, a []float32, lda int, x []float32, incX int) {
561 | C.cblas_stbmv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.enum_CBLAS_DIAG(diag),
562 | C.blasint(n), C.blasint(k), (*C.float)(unsafe.Pointer(&a[0])), C.blasint(lda), (*C.float)(unsafe.Pointer(&x[0])), C.blasint(incX))
563 | }
564 |
565 | // Dtbmv multiplies a triangular banded matrix with a vector.
566 | func Dtbmv(order Order, upLo UpLo, trans Transpose, diag Diag, n, k int, a []float64, lda int, x []float64, incX int) {
567 | C.cblas_dtbmv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.enum_CBLAS_DIAG(diag),
568 | C.blasint(n), C.blasint(k), (*C.double)(unsafe.Pointer(&a[0])), C.blasint(lda), (*C.double)(unsafe.Pointer(&x[0])), C.blasint(incX))
569 | }
570 |
571 | // Ctbmv multiplies a triangular banded matrix with a vector.
572 | func Ctbmv(order Order, upLo UpLo, trans Transpose, diag Diag, n, k int, a []complex64, lda int, x []complex64, incX int) {
573 | C.cblas_ctbmv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.enum_CBLAS_DIAG(diag),
574 | C.blasint(n), C.blasint(k), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&x[0]), C.blasint(incX))
575 | }
576 |
577 | // Ztbmv multiplies a triangular banded matrix with a vector.
578 | func Ztbmv(order Order, upLo UpLo, trans Transpose, diag Diag, n, k int, a []complex128, lda int, x []complex128, incX int) {
579 | C.cblas_ztbmv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.enum_CBLAS_DIAG(diag),
580 | C.blasint(n), C.blasint(k), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&x[0]), C.blasint(incX))
581 | }
582 |
583 | // Stbsv solves a banded triangular system of equations with a general matrix.
584 | func Stbsv(order Order, upLo UpLo, trans Transpose, diag Diag, n, k int, a []float32, lda int, x []float32, incX int) {
585 | C.cblas_stbsv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.enum_CBLAS_DIAG(diag), C.blasint(n), C.blasint(k), (*C.float)(unsafe.Pointer(&a[0])), C.blasint(lda), (*C.float)(unsafe.Pointer(&x[0])), C.blasint(incX))
586 | }
587 |
588 | // Dtbsv solves a banded triangular system of equations with a general matrix.
589 | func DTbsv(order Order, upLo UpLo, trans Transpose, diag Diag, n, k int, a []float64, lda int, x []float64, incX int) {
590 | C.cblas_dtbsv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.enum_CBLAS_DIAG(diag), C.blasint(n), C.blasint(k), (*C.double)(unsafe.Pointer(&a[0])), C.blasint(lda), (*C.double)(unsafe.Pointer(&x[0])), C.blasint(incX))
591 | }
592 |
593 | // Ctbsv solves a banded triangular system of equations with a general matrix.
594 | func CTbsv(order Order, upLo UpLo, trans Transpose, diag Diag, n, k int, a []complex64, lda int, x []complex64, incX int) {
595 | C.cblas_ctbsv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.enum_CBLAS_DIAG(diag), C.blasint(n), C.blasint(k), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&x[0]), C.blasint(incX))
596 | }
597 |
598 | // Ztbsv solves a banded triangular system of equations with a general matrix.
599 | func Ztbsv(order Order, upLo UpLo, trans Transpose, diag Diag, n, k int, a []complex128, lda int, x []complex128, incX int) {
600 | C.cblas_ztbsv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.enum_CBLAS_DIAG(diag), C.blasint(n), C.blasint(k), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&x[0]), C.blasint(incX))
601 | }
602 |
603 | // Stpmv Multiplies a packed triangular matrix by a vector.
604 | func Stpmv(order Order, upLo UpLo, trans Transpose, diag Diag, n int, ap []float32, x []float32, incX int) {
605 | C.cblas_stpmv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.enum_CBLAS_DIAG(diag), C.blasint(n), (*C.float)(unsafe.Pointer(&ap[0])), (*C.float)(unsafe.Pointer(&x[0])), C.blasint(incX))
606 | }
607 |
608 | // Dtpmv Multiplies a packed triangular matrix by a vector.
609 | func Dtpmv(order Order, upLo UpLo, trans Transpose, diag Diag, n int, ap []float64, x []float64, incX int) {
610 | C.cblas_dtpmv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.enum_CBLAS_DIAG(diag), C.blasint(n), (*C.double)(unsafe.Pointer(&ap[0])), (*C.double)(unsafe.Pointer(&x[0])), C.blasint(incX))
611 | }
612 |
613 | // Ctpmv Multiplies a packed triangular matrix by a vector.
614 | func Ctpmv(order Order, upLo UpLo, trans Transpose, diag Diag, n int, ap []complex64, x []complex64, incX int) {
615 | C.cblas_ctpmv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.enum_CBLAS_DIAG(diag), C.blasint(n), unsafe.Pointer(&ap[0]), unsafe.Pointer(&x[0]), C.blasint(incX))
616 | }
617 |
618 | // Ztpmv Multiplies a packed triangular matrix by a vector.
619 | func Ztpmv(order Order, upLo UpLo, trans Transpose, diag Diag, n int, ap []complex128, x []complex128, incX int) {
620 | C.cblas_ztpmv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.enum_CBLAS_DIAG(diag), C.blasint(n), unsafe.Pointer(&ap[0]), unsafe.Pointer(&x[0]), C.blasint(incX))
621 | }
622 |
623 | // Stpsv Multiplies a packed triangular matrix by a vector
624 | func Stpsv(order Order, upLo UpLo, trans Transpose, diag Diag, n int, ap []float32, x []float32, incX int) {
625 | C.cblas_stpsv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.enum_CBLAS_DIAG(diag),
626 | C.blasint(n), (*C.float)(unsafe.Pointer(&ap[0])), (*C.float)(unsafe.Pointer(&x[0])), C.blasint(incX))
627 | }
628 |
629 | // Dtpsv Multiplies a packed triangular matrix by a vector
630 | func Dtpsv(order Order, upLo UpLo, trans Transpose, diag Diag, n int, ap []float64, x []float64, incX int) {
631 | C.cblas_dtpsv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.enum_CBLAS_DIAG(diag),
632 | C.blasint(n), (*C.double)(unsafe.Pointer(&ap[0])), (*C.double)(unsafe.Pointer(&x[0])), C.blasint(incX))
633 | }
634 |
635 | // Ctpsv Multiplies a packed triangular matrix by a vector
636 | func Ctpsv(order Order, upLo UpLo, trans Transpose, diag Diag, n int, ap []complex64, x []complex64, incX int) {
637 | C.cblas_ctpsv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.enum_CBLAS_DIAG(diag),
638 | C.blasint(n), unsafe.Pointer(&ap[0]), unsafe.Pointer(&x[0]), C.blasint(incX))
639 | }
640 |
641 | // Ztpsv Multiplies a packed triangular matrix by a vector
642 | func Ztpsv(order Order, upLo UpLo, trans Transpose, diag Diag, n int, ap []complex128, x []complex128, incX int) {
643 | C.cblas_ztpsv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.enum_CBLAS_DIAG(diag),
644 | C.blasint(n), unsafe.Pointer(&ap[0]), unsafe.Pointer(&x[0]), C.blasint(incX))
645 | }
646 |
647 | // Ssymv computes y := alpha*A*x + beta*y for real symmetric matrix A
648 | func Ssymv(order Order, upLo UpLo, n int, alpha float32, a []float32, lda int, x []float32, incX int, beta float32, y []float32, incY int) {
649 | C.cblas_ssymv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.blasint(n), C.float(alpha), (*C.float)(unsafe.Pointer(&a[0])), C.blasint(lda), (*C.float)(unsafe.Pointer(&x[0])), C.blasint(incX), C.float(beta), (*C.float)(unsafe.Pointer(&y[0])), C.blasint(incY))
650 | }
651 |
652 | // Dsymv computes y := alpha*A*x + beta*y for real symmetric matrix A
653 | func Dsymv(order Order, upLo UpLo, n int, alpha float64, a []float64, lda int, x []float64, incX int, beta float64, y []float64, incY int) {
654 | C.cblas_dsymv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.blasint(n), C.double(alpha), (*C.double)(unsafe.Pointer(&a[0])), C.blasint(lda), (*C.double)(unsafe.Pointer(&x[0])), C.blasint(incX), C.double(beta), (*C.double)(unsafe.Pointer(&y[0])), C.blasint(incY))
655 | }
656 |
657 | // Chemv computes y := alpha*A*x + beta*y for complex Hermitian matrix A
658 | func Chemv(order Order, upLo UpLo, n int, alpha complex64, a []complex64, lda int, x []complex64, incX int, beta complex64, y []complex64, incY int) {
659 | C.cblas_chemv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.blasint(n), unsafe.Pointer(&alpha), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&x[0]), C.blasint(incX), unsafe.Pointer(&beta), unsafe.Pointer(&y[0]), C.blasint(incY))
660 | }
661 |
662 | // Zhemv computes y := alpha*A*x + beta*y for complex Hermitian matrix A
663 | func Zhemv(order Order, upLo UpLo, n int, alpha complex128, a []complex128, lda int, x []complex128, incX int, beta complex128, y []complex128, incY int) {
664 | C.cblas_zhemv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.blasint(n), unsafe.Pointer(&alpha), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&x[0]), C.blasint(incX), unsafe.Pointer(&beta), unsafe.Pointer(&y[0]), C.blasint(incY))
665 | }
666 |
667 | // Sspmv performs a symmetric packed matrix-vector multiplication.
668 | func Sspmv(order Order, upLo UpLo, n int, alpha float32, ap []float32, x []float32, incX int, beta float32, y []float32, incY int) {
669 | C.cblas_sspmv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.blasint(n), C.float(alpha), (*C.float)(unsafe.Pointer(&ap[0])), (*C.float)(unsafe.Pointer(&x[0])), C.blasint(incX), C.float(beta), (*C.float)(unsafe.Pointer(&y[0])), C.blasint(incY))
670 | }
671 |
672 | // Dspmv performs a symmetric packed matrix-vector multiplication.
673 | func Dspmv(order Order, upLo UpLo, n int, alpha float64, ap []float64, x []float64, incX int, beta float64, y []float64, incY int) {
674 | C.cblas_dspmv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.blasint(n), C.double(alpha), (*C.double)(unsafe.Pointer(&ap[0])), (*C.double)(unsafe.Pointer(&x[0])), C.blasint(incX), C.double(beta), (*C.double)(unsafe.Pointer(&y[0])), C.blasint(incY))
675 | }
676 |
677 | // Sspr Perform a symmetric rank-1 update of a symmetric packed matrix with a real symmetric vector
678 | func Sspr(order Order, upLo UpLo, n int, alpha float32, x []float32, incX int, ap []float32) {
679 | C.cblas_sspr(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.blasint(n), C.float(alpha), (*C.float)(unsafe.Pointer(&x[0])), C.blasint(incX), (*C.float)(unsafe.Pointer(&ap[0])))
680 | }
681 |
682 | // Dspr Perform a symmetric rank-1 update of a symmetric packed matrix with a real symmetric vector
683 | func Dspr(order Order, upLo UpLo, n int, alpha float64, x []float64, incX int, ap []float64) {
684 | C.cblas_dspr(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.blasint(n), C.double(alpha), (*C.double)(unsafe.Pointer(&x[0])), C.blasint(incX), (*C.double)(unsafe.Pointer(&ap[0])))
685 | }
686 |
687 | // Chpr Perform a Hermitian rank-1 update of a Hermitian packed matrix with a complex Hermitian vector
688 | func Chpr(order Order, upLo UpLo, n int, alpha float32, x []complex64, incX int, ap []complex64) {
689 | C.cblas_chpr(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.blasint(n), C.float(alpha), unsafe.Pointer(&x[0]), C.blasint(incX), unsafe.Pointer(&ap[0]))
690 | }
691 |
692 | // Zhpr Perform a Hermitian rank-1 update of a Hermitian packed matrix with a complex Hermitian vector
693 | func Zhpr(order Order, upLo UpLo, n int, alpha float64, x []complex128, incX int, ap []complex128) {
694 | C.cblas_zhpr(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.blasint(n), C.double(alpha), unsafe.Pointer(&x[0]), C.blasint(incX), unsafe.Pointer(&ap[0]))
695 | }
696 |
697 | // Sspr2 computes the symmetric rank 2 operation A := alpha*x*y**T + alpha*y*x**T + A,
698 | func Sspr2(order Order, upLo UpLo, n int, alpha float32, x []float32, incX int, y []float32, incY int, ap []float32) {
699 | C.cblas_sspr2(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.blasint(n), C.float(alpha), (*C.float)(unsafe.Pointer(&x[0])), C.blasint(incX), (*C.float)(unsafe.Pointer(&y[0])), C.blasint(incY), (*C.float)(unsafe.Pointer(&ap[0])))
700 | }
701 |
702 | // Dspr2 computes the symmetric rank 2 operation A := alpha*x*y**T + alpha*y*x**T + A,
703 | func Dspr2(order Order, upLo UpLo, n int, alpha float64, x []float64, incX int, y []float64, incY int, ap []float64) {
704 | C.cblas_dspr2(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.blasint(n), C.double(alpha), (*C.double)(unsafe.Pointer(&x[0])), C.blasint(incX), (*C.double)(unsafe.Pointer(&y[0])), C.blasint(incY), (*C.double)(unsafe.Pointer(&ap[0])))
705 | }
706 |
707 | // Chpr2 performs the Hermitian rank 2 operation A := alpha*x*y**H + conjg(alpha)*y*x**H + A,
708 | func Chpr2(order Order, upLo UpLo, n int, alpha complex64, x []complex64, incX int, y []complex64, incY int, ap []complex64) {
709 | C.cblas_chpr2(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.blasint(n), unsafe.Pointer(&alpha), unsafe.Pointer(&x[0]), C.blasint(incX), unsafe.Pointer(&y[0]), C.blasint(incY), unsafe.Pointer(&ap[0]))
710 | }
711 |
712 | // Zhpr2 performs the Hermitian rank 2 operation A := alpha*x*y**H + conjg(alpha)*y*x**H + A,
713 | func Zhpr2(order Order, upLo UpLo, n int, alpha complex128, x []complex128, incX int, y []complex128, incY int, ap []complex128) {
714 | C.cblas_zhpr2(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.blasint(n), unsafe.Pointer(&alpha), unsafe.Pointer(&x[0]), C.blasint(incX), unsafe.Pointer(&y[0]), C.blasint(incY), unsafe.Pointer(&ap[0]))
715 | }
716 |
717 | // CHbmv performs the matrix-vector operation: y = alpha*A*x + beta*y.
718 | func Chbmv(order Order, upLo UpLo, n, k int, alpha complex64, a []complex64, lda int, x []complex64, incX int, beta complex64, y []complex64, incY int) {
719 | C.cblas_chbmv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.blasint(n), C.blasint(k), unsafe.Pointer(&alpha), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&x[0]), C.blasint(incX), unsafe.Pointer(&beta), unsafe.Pointer(&y[0]), C.blasint(incY))
720 | }
721 |
722 | // ZHbmv performs the matrix-vector operation: y = alpha*A*x + beta*y.
723 | func Zhbmv(order Order, upLo UpLo, n, k int, alpha complex128, a []complex128, lda int, x []complex128, incX int, beta complex128, y []complex128, incY int) {
724 | C.cblas_zhbmv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.blasint(n), C.blasint(k), unsafe.Pointer(&alpha), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&x[0]), C.blasint(incX), unsafe.Pointer(&beta), unsafe.Pointer(&y[0]), C.blasint(incY))
725 | }
726 |
727 | // CHpmv performs the matrix-vector operation: y = alpha*A*x + beta*y.
728 | func Chpmv(order Order, upLo UpLo, n int, alpha complex64, ap []complex64, x []complex64, incX int, beta complex64, y []complex64, incY int) {
729 | C.cblas_chpmv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.blasint(n), unsafe.Pointer(&alpha), unsafe.Pointer(&ap[0]), unsafe.Pointer(&x[0]), C.blasint(incX), unsafe.Pointer(&beta), unsafe.Pointer(&y[0]), C.blasint(incY))
730 | }
731 |
732 | // ZHpmv performs the matrix-vector operation: y = alpha*A*x + beta*y.
733 | func Zhpmv(order Order, upLo UpLo, n int, alpha complex128, ap []complex128, x []complex128, incX int, beta complex128, y []complex128, incY int) {
734 | C.cblas_zhpmv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.blasint(n), unsafe.Pointer(&alpha), unsafe.Pointer(&ap[0]), unsafe.Pointer(&x[0]), C.blasint(incX), unsafe.Pointer(&beta), unsafe.Pointer(&y[0]), C.blasint(incY))
735 | }
736 |
737 | // Sgemm computes the matrix-matrix product where the matrices are
738 | func Sgemm(order Order, transA, transB Transpose, m, n, k int, alpha float32, a []float32, lda int, b []float32, ldb int, beta float32, c []float32, ldc int) {
739 | C.cblas_sgemm(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_TRANSPOSE(transA), C.enum_CBLAS_TRANSPOSE(transB), C.blasint(m), C.blasint(n), C.blasint(k), C.float(alpha), (*C.float)(unsafe.Pointer(&a[0])), C.blasint(lda), (*C.float)(unsafe.Pointer(&b[0])), C.blasint(ldb), C.float(beta), (*C.float)(unsafe.Pointer(&c[0])), C.blasint(ldc))
740 | }
741 |
742 | // Dgemm computes the matrix-matrix product where the matrices are
743 | func Dgemm(order Order, transA, transB Transpose, m, n, k int, alpha float64, a []float64, lda int, b []float64, ldb int, beta float64, c []float64, ldc int) {
744 | C.cblas_dgemm(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_TRANSPOSE(transA), C.enum_CBLAS_TRANSPOSE(transB), C.blasint(m), C.blasint(n), C.blasint(k), C.double(alpha), (*C.double)(unsafe.Pointer(&a[0])), C.blasint(lda), (*C.double)(unsafe.Pointer(&b[0])), C.blasint(ldb), C.double(beta), (*C.double)(unsafe.Pointer(&c[0])), C.blasint(ldc))
745 | }
746 |
747 | // Cgemm performs matrix-matrix multiplication with complex single-precision matrix A and matrix B and stores the result in matrix C.
748 | func Cgemm(order Order, transA, transB Transpose, m, n, k int, alpha complex64, a []complex64, lda int, b []complex64, ldb int, beta complex64, c []complex64, ldc int) {
749 | C.cblas_cgemm(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_TRANSPOSE(transA), C.enum_CBLAS_TRANSPOSE(transB), C.blasint(m), C.blasint(n), C.blasint(k), unsafe.Pointer(&alpha), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&b[0]), C.blasint(ldb), unsafe.Pointer(&beta), unsafe.Pointer(&c[0]), C.blasint(ldc))
750 | }
751 |
752 | // Cgemm3m performs matrix-matrix multiplication with complex single-precision matrix A and matrix B and stores the result in matrix C.
753 | func Cgemm3m(order Order, transA, transB Transpose, m, n, k int, alpha complex64, a []complex64, lda int, b []complex64, ldb int, beta complex64, c []complex64, ldc int) {
754 | C.cblas_cgemm3m(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_TRANSPOSE(transA), C.enum_CBLAS_TRANSPOSE(transB), C.blasint(m), C.blasint(n), C.blasint(k), unsafe.Pointer(&alpha), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&b[0]), C.blasint(ldb), unsafe.Pointer(&beta), unsafe.Pointer(&c[0]), C.blasint(ldc))
755 | }
756 |
757 | // Zgemm performs matrix-matrix multiplication with complex double-precision matrix A and matrix B and stores the result in matrix C.
758 | func Zgemm(order Order, transA, transB Transpose, m, n, k int, alpha complex128, a []complex128, lda int, b []complex128, ldb int, beta complex128, c []complex128, ldc int) {
759 | C.cblas_zgemm(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_TRANSPOSE(transA), C.enum_CBLAS_TRANSPOSE(transB), C.blasint(m), C.blasint(n), C.blasint(k), unsafe.Pointer(&alpha), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&b[0]), C.blasint(ldb), unsafe.Pointer(&beta), unsafe.Pointer(&c[0]), C.blasint(ldc))
760 | }
761 |
762 | // Zgemm3m performs matrix-matrix multiplication with complex double-precision matrix A and matrix B and stores the result in matrix C.
763 | func Zgemm3m(order Order, transA, transB Transpose, m, n, k int, alpha complex128, a []complex128, lda int, b []complex128, ldb int, beta complex128, c []complex128, ldc int) {
764 | C.cblas_zgemm3m(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_TRANSPOSE(transA), C.enum_CBLAS_TRANSPOSE(transB), C.blasint(m), C.blasint(n), C.blasint(k), unsafe.Pointer(&alpha), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&b[0]), C.blasint(ldb), unsafe.Pointer(&beta), unsafe.Pointer(&c[0]), C.blasint(ldc))
765 | }
766 |
767 | // Ssymm multiplies symmetric matrix A by matrix B and scales the result by beta, and accumulates the result into matrix C.
768 | func Ssymm(order Order, side Side, upLo UpLo, m, n int, alpha float32, a []float32, lda int, b []float32, ldb int, beta float32, c []float32, ldc int) {
769 | C.cblas_ssymm(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_SIDE(side), C.enum_CBLAS_UPLO(upLo), C.blasint(m), C.blasint(n), C.float(alpha), (*C.float)(unsafe.Pointer(&a[0])), C.blasint(lda), (*C.float)(unsafe.Pointer(&b[0])), C.blasint(ldb), C.float(beta), (*C.float)(unsafe.Pointer(&c[0])), C.blasint(ldc))
770 | }
771 |
772 | // Dsymm multiplies symmetric matrix A by matrix B and scales the result by beta, and accumulates the result into matrix C.
773 | func Dsymm(order Order, side Side, upLo UpLo, m, n int, alpha float64, a []float64, lda int, b []float64, ldb int, beta float64, c []float64, ldc int) {
774 | C.cblas_dsymm(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_SIDE(side), C.enum_CBLAS_UPLO(upLo), C.blasint(m), C.blasint(n), C.double(alpha), (*C.double)(unsafe.Pointer(&a[0])), C.blasint(lda), (*C.double)(unsafe.Pointer(&b[0])), C.blasint(ldb), C.double(beta), (*C.double)(unsafe.Pointer(&c[0])), C.blasint(ldc))
775 | }
776 |
777 | // Csymm multiplies symmetric matrix A by matrix B and scales the result by beta, and accumulates the result into matrix C.
778 | func Csymm(order Order, side Side, upLo UpLo, m, n int, alpha complex64, a []complex64, lda int, b []complex64, ldb int, beta complex64, c []complex64, ldc int) {
779 | C.cblas_csymm(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_SIDE(side), C.enum_CBLAS_UPLO(upLo), C.blasint(m), C.blasint(n), unsafe.Pointer(&alpha), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&b[0]), C.blasint(ldb), unsafe.Pointer(&beta), unsafe.Pointer(&c[0]), C.blasint(ldc))
780 | }
781 |
782 | // Zsymm multiplies symmetric matrix A by matrix B and scales the result by beta, and accumulates the result into matrix C.
783 | func Zsymm(order Order, side Side, upLo UpLo, m, n int, alpha complex128, a []complex128, lda int, b []complex128, ldb int, beta complex128, c []complex128, ldc int) {
784 | C.cblas_zsymm(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_SIDE(side), C.enum_CBLAS_UPLO(upLo), C.blasint(m), C.blasint(n), unsafe.Pointer(&alpha), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&b[0]), C.blasint(ldb), unsafe.Pointer(&beta), unsafe.Pointer(&c[0]), C.blasint(ldc))
785 | }
786 |
787 | // Ssyrk performs a symmetric rank-k operation on a float matrix.
788 | func Ssyrk(order Order, upLo UpLo, trans Transpose, n, k int, alpha float32, a []float32, lda int, beta float32, c []float32, ldc int) {
789 | C.cblas_ssyrk(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.blasint(n), C.blasint(k), C.float(alpha), (*C.float)(unsafe.Pointer(&a[0])), C.blasint(lda), C.float(beta), (*C.float)(unsafe.Pointer(&c[0])), C.blasint(ldc))
790 | }
791 |
792 | // Dsyrk performs a symmetric rank-k operation on a double matrix.
793 | func Dsyrk(order Order, upLo UpLo, trans Transpose, n, k int, alpha float64, a []float64, lda int, beta float64, c []float64, ldc int) {
794 | C.cblas_dsyrk(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.blasint(n), C.blasint(k), C.double(alpha), (*C.double)(unsafe.Pointer(&a[0])), C.blasint(lda), C.double(beta), (*C.double)(unsafe.Pointer(&c[0])), C.blasint(ldc))
795 | }
796 |
797 | // Csyrk performs a symmetric rank-k operation on a complex float matrix.
798 | func Csyrk(order Order, upLo UpLo, trans Transpose, n, k int, alpha complex64, a []complex64, lda int, beta complex64, c []complex64, ldc int) {
799 | C.cblas_csyrk(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.blasint(n), C.blasint(k), unsafe.Pointer(&alpha), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&beta), unsafe.Pointer(&c[0]), C.blasint(ldc))
800 | }
801 |
802 | // Zsyrk performs a symmetric rank-k operation on a complex double matrix.
803 | func Zsyrk(order Order, upLo UpLo, trans Transpose, n, k int, alpha complex128, a []complex128, lda int, beta complex128, c []complex128, ldc int) {
804 | C.cblas_zsyrk(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.blasint(n), C.blasint(k), unsafe.Pointer(&alpha), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&beta), unsafe.Pointer(&c[0]), C.blasint(ldc))
805 | }
806 |
807 | // Ssyr2k performs symmetric rank-2k update of a real symmetric matrix. C := alpha * A * B^T + alpha * B * A^T + beta * C
808 | func Ssyr2k(order Order, upLo UpLo, trans Transpose, n, k int, alpha float32, a []float32, lda int, b []float32, ldb int, beta float32, c []float32, ldc int) {
809 | C.cblas_ssyr2k(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.blasint(n), C.blasint(k), C.float(alpha), (*C.float)(unsafe.Pointer(&a[0])), C.blasint(lda), (*C.float)(unsafe.Pointer(&b[0])), C.blasint(ldb), C.float(beta), (*C.float)(unsafe.Pointer(&c[0])), C.blasint(ldc))
810 | }
811 |
812 | // Dsyr2k performs symmetric rank-2k update of a real symmetric matrix. C := alpha * A * B^T + alpha * B * A^T + beta * C
813 | func Dsyr2k(order Order, upLo UpLo, trans Transpose, n, k int, alpha float64, a []float64, lda int, b []float64, ldb int, beta float64, c []float64, ldc int) {
814 | C.cblas_dsyr2k(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.blasint(n), C.blasint(k), C.double(alpha), (*C.double)(unsafe.Pointer(&a[0])), C.blasint(lda), (*C.double)(unsafe.Pointer(&b[0])), C.blasint(ldb), C.double(beta), (*C.double)(unsafe.Pointer(&c[0])), C.blasint(ldc))
815 | }
816 |
817 | // Csyr2k performs symmetric rank-2k update of a real symmetric matrix. C := alpha * A * B^T + alpha * B * A^T + beta * C
818 | func Csyr2k(order Order, upLo UpLo, trans Transpose, n, k int, alpha complex64, a []complex64, lda int, b []complex64, ldb int, beta complex64, c []complex64, ldc int) {
819 | C.cblas_csyr2k(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.blasint(n), C.blasint(k), unsafe.Pointer(&alpha), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&b[0]), C.blasint(ldb), unsafe.Pointer(&beta), unsafe.Pointer(&c[0]), C.blasint(ldc))
820 | }
821 |
822 | // Zsyr2k performs symmetric rank-2k update of a real symmetric matrix. C := alpha * A * B^T + alpha * B * A^T + beta * C
823 | func Zsyr2k(order Order, upLo UpLo, trans Transpose, n, k int, alpha complex128, a []complex128, lda int, b []complex128, ldb int, beta complex128, c []complex128, ldc int) {
824 | C.cblas_zsyr2k(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.blasint(n), C.blasint(k), unsafe.Pointer(&alpha), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&b[0]), C.blasint(ldb), unsafe.Pointer(&beta), unsafe.Pointer(&c[0]), C.blasint(ldc))
825 | }
826 |
827 | // Strmm performs a matrix-matrix operation with a triangular matrix.
828 | func Strmm(order Order, side Side, upLo UpLo, transA Transpose, diag Diag, m, n int, alpha float32, a []float32, lda int, b []float32, ldb int) {
829 | C.cblas_strmm(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_SIDE(side), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(transA), C.enum_CBLAS_DIAG(diag), C.blasint(m), C.blasint(n), C.float(alpha), (*C.float)(unsafe.Pointer(&a[0])), C.blasint(lda), (*C.float)(unsafe.Pointer(&b[0])), C.blasint(ldb))
830 | }
831 |
832 | // Dtrmm performs a matrix-matrix operation with a triangular matrix.
833 | func Dtrmm(order Order, side Side, upLo UpLo, transA Transpose, diag Diag, m, n int, alpha float64, a []float64, lda int, b []float64, ldb int) {
834 | C.cblas_dtrmm(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_SIDE(side), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(transA), C.enum_CBLAS_DIAG(diag), C.blasint(m), C.blasint(n), C.double(alpha), (*C.double)(unsafe.Pointer(&a[0])), C.blasint(lda), (*C.double)(unsafe.Pointer(&b[0])), C.blasint(ldb))
835 | }
836 |
837 | // Ctrmm performs a matrix-matrix operation with a triangular matrix.
838 | func Ctrmm(order Order, side Side, upLo UpLo, transA Transpose, diag Diag, m, n int, alpha complex64, a []complex64, lda int, b []complex64, ldb int) {
839 | C.cblas_ctrmm(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_SIDE(side), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(transA), C.enum_CBLAS_DIAG(diag), C.blasint(m), C.blasint(n), unsafe.Pointer(&alpha), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&b[0]), C.blasint(ldb))
840 | }
841 |
842 | // Ztrmm performs a matrix-matrix operation with a triangular matrix.
843 | func Ztrmm(order Order, side Side, upLo UpLo, transA Transpose, diag Diag, m, n int, alpha complex128, a []complex128, lda int, b []complex128, ldb int) {
844 | C.cblas_ztrmm(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_SIDE(side), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(transA), C.enum_CBLAS_DIAG(diag), C.blasint(m), C.blasint(n), unsafe.Pointer(&alpha), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&b[0]), C.blasint(ldb))
845 | }
846 |
847 | // Strsm solves a triangular system of equations with multiple values for the right side.
848 | func Strsm(order Order, side Side, upLo UpLo, transA Transpose, diag Diag, m, n int, alpha float32, a []float32, lda int, b []float32, ldb int) {
849 | C.cblas_strsm(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_SIDE(side), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(transA), C.enum_CBLAS_DIAG(diag), C.blasint(m), C.blasint(n), C.float(alpha), (*C.float)(unsafe.Pointer(&a[0])), C.blasint(lda), (*C.float)(unsafe.Pointer(&b[0])), C.blasint(ldb))
850 | }
851 |
852 | // Dtrsm solves a triangular system of equations with multiple values for the right side.
853 | func Dtrsm(order Order, side Side, upLo UpLo, transA Transpose, diag Diag, m, n int, alpha float64, a []float64, lda int, b []float64, ldb int) {
854 | C.cblas_dtrsm(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_SIDE(side), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(transA), C.enum_CBLAS_DIAG(diag), C.blasint(m), C.blasint(n), C.double(alpha), (*C.double)(unsafe.Pointer(&a[0])), C.blasint(lda), (*C.double)(unsafe.Pointer(&b[0])), C.blasint(ldb))
855 | }
856 |
857 | // Ctrsm solves a triangular system of equations with multiple values for the right side.
858 | func Ctrsm(order Order, side Side, upLo UpLo, transA Transpose, diag Diag, m, n int, alpha complex64, a []complex64, lda int, b []complex64, ldb int) {
859 | C.cblas_ctrsm(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_SIDE(side), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(transA), C.enum_CBLAS_DIAG(diag), C.blasint(m), C.blasint(n), unsafe.Pointer(&alpha), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&b[0]), C.blasint(ldb))
860 | }
861 |
862 | // Ztrsm solves a triangular system of equations with multiple values for the right side.
863 | func Ztrsm(order Order, side Side, upLo UpLo, transA Transpose, diag Diag, m, n int, alpha complex128, a []complex128, lda int, b []complex128, ldb int) {
864 | C.cblas_ztrsm(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_SIDE(side), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(transA), C.enum_CBLAS_DIAG(diag), C.blasint(m), C.blasint(n), unsafe.Pointer(&alpha), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&b[0]), C.blasint(ldb))
865 | }
866 |
867 | // Multiply a Hermitian matrix with a general matrix. C = alpha * A * B + beta * C
868 | func Chemm(order Order, side Side, upLo UpLo, m int, n int, alpha complex64, a []complex64, lda int, b []complex64, ldb int, beta complex64, c []complex64, ldc int) {
869 | C.cblas_chemm(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_SIDE(side), C.enum_CBLAS_UPLO(upLo), C.blasint(m), C.blasint(n), unsafe.Pointer(&alpha), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&b[0]), C.blasint(ldb), unsafe.Pointer(&beta), unsafe.Pointer(&c[0]), C.blasint(ldc))
870 | }
871 |
872 | // Multiply a Hermitian matrix with a general matrix. C = alpha * A * B + beta * C
873 | func Zhemm(order Order, side Side, upLo UpLo, m int, n int, alpha complex128, a []complex128, lda int, b []complex128, ldb int, beta complex128, c []complex128, ldc int) {
874 | C.cblas_zhemm(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_SIDE(side), C.enum_CBLAS_UPLO(upLo), C.blasint(m), C.blasint(n), unsafe.Pointer(&alpha), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&b[0]), C.blasint(ldb), unsafe.Pointer(&beta), unsafe.Pointer(&c[0]), C.blasint(ldc))
875 | }
876 |
877 | // Cherk performs a Hermitian rank-k update.
878 | func Cherk(order Order, upLo UpLo, trans Transpose, n, k int, alpha float32, a []complex64, lda int, beta float32, c []complex64, ldc int) {
879 | C.cblas_cherk(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.blasint(n), C.blasint(k), C.float(alpha), unsafe.Pointer(&a[0]), C.blasint(lda), C.float(beta), unsafe.Pointer(&c[0]), C.blasint(ldc))
880 | }
881 |
882 | // Zherk performs a Hermitian rank-k update.
883 | func Zherk(order Order, upLo UpLo, trans Transpose, n, k int, alpha float64, a []complex128, lda int, beta float64, c []complex128, ldc int) {
884 | C.cblas_zherk(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.blasint(n), C.blasint(k), C.double(alpha), unsafe.Pointer(&a[0]), C.blasint(lda), C.double(beta), unsafe.Pointer(&c[0]), C.blasint(ldc))
885 | }
886 |
887 | // Cher2k performs a Hermitian rank-2k update.
888 | func Cher2k(order Order, upLo UpLo, trans Transpose, n, k int, alpha complex64, a []complex64, lda int, b []complex64, ldb C.int, beta float32, c []complex64, ldc int) {
889 | C.cblas_cher2k(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.blasint(n), C.blasint(k), unsafe.Pointer(&alpha), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&b[0]), C.blasint(ldb), C.float(beta), unsafe.Pointer(&c[0]), C.blasint(ldc))
890 | }
891 |
892 | // Zher2k performs a Hermitian rank-2k update.
893 | func Zher2k(order Order, upLo UpLo, trans Transpose, n, k int, alpha complex128, a []complex128, lda int, b []complex128, ldb C.int, beta float64, c []complex128, ldc int) {
894 | C.cblas_zher2k(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_UPLO(upLo), C.enum_CBLAS_TRANSPOSE(trans), C.blasint(n), C.blasint(k), unsafe.Pointer(&alpha), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&b[0]), C.blasint(ldb), C.double(beta), unsafe.Pointer(&c[0]), C.blasint(ldc))
895 | }
896 |
897 | // Saxpby computes y := alpha*x + beta*y for float arrays x and y.
898 | func Saxpby(n int, alpha float32, x []float32, incx int, beta float32, y []float32, incy int) {
899 | C.cblas_saxpby(C.blasint(n), C.float(alpha), (*C.float)(unsafe.Pointer(&x[0])), C.blasint(incx), C.float(beta), (*C.float)(unsafe.Pointer(&y[0])), C.blasint(incy))
900 | }
901 |
902 | // Daxpby computes y := alpha*x + beta*y for double arrays x and y.
903 | func Daxpby(n int, alpha float64, x []float64, incx int, beta float64, y []float64, incy int) {
904 | C.cblas_daxpby(C.blasint(n), C.double(alpha), (*C.double)(unsafe.Pointer(&x[0])), C.blasint(incx), C.double(beta), (*C.double)(unsafe.Pointer(&y[0])), C.blasint(incy))
905 | }
906 |
907 | // Caxpby computes y := alpha*x + beta*y for complex float arrays x and y.
908 | func Caxpby(n int, alpha complex64, x []complex64, incx int, beta complex64, y []complex64, incy int) {
909 | C.cblas_caxpby(C.blasint(n), unsafe.Pointer(&alpha), unsafe.Pointer(&x[0]), C.blasint(incx), unsafe.Pointer(&beta), unsafe.Pointer(&y[0]), C.blasint(incy))
910 | }
911 |
912 | // Zaxpby computes y := alpha*x + beta*y for complex double arrays x and y.
913 | func Zaxpby(n int, alpha complex128, x []complex128, incx int, beta complex128, y []complex128, incy int) {
914 | C.cblas_zaxpby(C.blasint(n), unsafe.Pointer(&alpha), unsafe.Pointer(&x[0]), C.blasint(incx), unsafe.Pointer(&beta), unsafe.Pointer(&y[0]), C.blasint(incy))
915 | }
916 |
917 | // SomatCopy performs scaling and out-place transposition/copying of matrices.
918 | func SomatCopy(order Order, trans Transpose, rows, cols int, alpha float32, a []float32, lda int, b []float32, ldb int) {
919 | C.cblas_somatcopy(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_TRANSPOSE(trans), C.blasint(rows), C.blasint(cols), C.float(alpha), (*C.float)(unsafe.Pointer(&a[0])), C.blasint(lda), (*C.float)(unsafe.Pointer(&b[0])), C.blasint(ldb))
920 | }
921 |
922 | // DomatCopy performs scaling and out-place transposition/copying of matrices.
923 | func DomatCopy(order Order, trans Transpose, rows, cols int, alpha float64, a []float64, lda int, b []float64, ldb int) {
924 | C.cblas_domatcopy(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_TRANSPOSE(trans), C.blasint(rows), C.blasint(cols), C.double(alpha), (*C.double)(unsafe.Pointer(&a[0])), C.blasint(lda), (*C.double)(unsafe.Pointer(&b[0])), C.blasint(ldb))
925 | }
926 |
927 | // ComatCopy performs scaling and out-place transposition/copying of matrices.
928 | func ComatCopy(order Order, trans Transpose, rows, cols int, alpha complex64, a []complex64, lda int, b []complex64, ldb int) {
929 | // FIXME: I think cblast.h has the incorrect definition
930 | //C.cblas_comatcopy(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_TRANSPOSE(trans), C.blasint(rows), C.blasint(cols), unsafe.Pointer(&alpha), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&b[0]), C.blasint(ldb))
931 | }
932 |
933 | // ZomatCopy performs scaling and out-place transposition/copying of matrices.
934 | func ZomatCopy(order Order, trans Transpose, rows, cols int, alpha complex128, a []complex128, lda int, b []complex128, ldb int) {
935 | // FIXME: I think cblast.h has the incorrect definition
936 | //C.cblas_zomatcopy(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_TRANSPOSE(trans), C.blasint(rows), C.blasint(cols), unsafe.Pointer(&alpha), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&b[0]), C.blasint(ldb))
937 | }
938 |
939 | // SimatCopy performs scaling and in-place transposition/copying of matrices.
940 | func SimatCopy(order Order, trans Transpose, rows, cols int, alpha float32, a []float32, lda int, ldb int) {
941 | C.cblas_simatcopy(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_TRANSPOSE(trans), C.blasint(rows), C.blasint(cols), C.float(alpha), (*C.float)(unsafe.Pointer(&a[0])), C.blasint(lda), C.blasint(ldb))
942 | }
943 |
944 | // DimatCopy performs scaling and in-place transposition/copying of matrices.
945 | func DimatCopy(order Order, trans Transpose, rows, cols int, alpha float64, a []float64, lda int, ldb int) {
946 | C.cblas_dimatcopy(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_TRANSPOSE(trans), C.blasint(rows), C.blasint(cols), C.double(alpha), (*C.double)(unsafe.Pointer(&a[0])), C.blasint(lda), C.blasint(ldb))
947 | }
948 |
949 | // CimatCopy performs scaling and in-place transposition/copying of matrices.
950 | func CimatCopy(order Order, trans Transpose, rows, cols int, alpha complex64, a []complex64, lda int, ldb int) {
951 | // FIXME: I think cblast.h has the incorrect definition
952 | //C.cblas_cimatcopy(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_TRANSPOSE(trans), C.blasint(rows), C.blasint(cols), unsafe.Pointer(&alpha), unsafe.Pointer(&a[0]), C.blasint(lda), C.blasint(ldb))
953 | }
954 |
955 | // ZimatCopy performs scaling and in-place transposition/copying of matrices.
956 | func ZimatCopy(order Order, trans Transpose, rows, cols int, alpha complex128, a []complex128, lda int, ldb int) {
957 | // FIXME: I think cblast.h has the incorrect definition
958 | //C.cblas_zimatcopy(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_TRANSPOSE(trans), C.blasint(rows), C.blasint(cols), unsafe.Pointer(&alpha), unsafe.Pointer(&a[0]), C.blasint(lda), C.blasint(ldb))
959 | }
960 |
961 | // Sgeadd adds a matrix A to a matrix C with scalar alpha and beta.
962 | func Sgeadd(order Order, rows, cols int, alpha float32, a []float32, lda int, beta float32, c []float32, ldc int) {
963 | C.cblas_sgeadd(C.enum_CBLAS_ORDER(order), C.blasint(rows), C.blasint(cols), C.float(alpha), (*C.float)(unsafe.Pointer(&a[0])), C.blasint(lda), C.float(beta), (*C.float)(unsafe.Pointer(&c[0])), C.blasint(ldc))
964 | }
965 |
966 | // Dgeadd adds a matrix A to a matrix C with scalar alpha and beta.
967 | func Dgeadd(order Order, rows, cols int, alpha float64, a []float64, lda int, beta float64, c []float64, ldc int) {
968 | C.cblas_dgeadd(C.enum_CBLAS_ORDER(order), C.blasint(rows), C.blasint(cols), C.double(alpha), (*C.double)(unsafe.Pointer(&a[0])), C.blasint(lda), C.double(beta), (*C.double)(unsafe.Pointer(&c[0])), C.blasint(ldc))
969 | }
970 |
971 | // Cgeadd adds a matrix A to a matrix C with complex scalar alpha and beta.
972 | func Cgeadd(order Order, rows, cols int, alpha complex64, a []complex64, lda int, beta complex64, c []complex64, ldc int) {
973 | // FIXME: I think cblast.h has the incorrect definition
974 | //C.cblas_cgeadd(C.enum_CBLAS_ORDER(order), C.blasint(rows), C.blasint(cols), unsafe.Pointer(&alpha), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&beta), unsafe.Pointer(&c[0]), C.blasint(ldc))
975 | }
976 |
977 | // Zgeadd adds a matrix A to a matrix C with complex scalar alpha and beta.
978 | func Zgeadd(order Order, rows, cols int, alpha complex128, a []complex128, lda int, beta complex128, c []complex128, ldc int) {
979 | // FIXME: I think cblast.h has the incorrect definition
980 | //C.cblas_zgeadd(C.enum_CBLAS_ORDER(order), C.blasint(rows), C.blasint(cols), unsafe.Pointer(&alpha), unsafe.Pointer(&a[0]), C.blasint(lda), unsafe.Pointer(&beta), unsafe.Pointer(&c[0]), C.blasint(ldc))
981 | }
982 |
983 | // Convert float array to bfloat16 array by rounding
984 | func SbstoBf16(n int, in []float32, incIn int, out []Bfloat16, incOut int) {
985 | // FIXME: No symbol
986 | //C.cblas_sbstobf16(C.blasint(n), (*C.float)(unsafe.Pointer(&in[0])), C.blasint(incIn), (*C.bfloat16)(unsafe.Pointer(&out[0])), C.blasint(incOut))
987 | }
988 |
989 | // Convert double array to bfloat16 array by rounding
990 | func DbtoBf16(n int, in []float64, incIn int, out []Bfloat16, incOut int) {
991 | // FIXME: No symbol
992 | //C.cblas_sbdtobf16(C.blasint(n), (*C.double)(unsafe.Pointer(&in[0])), C.blasint(incIn), (*C.bfloat16)(unsafe.Pointer(&out[0])), C.blasint(incOut))
993 | }
994 |
995 | // Convert bfloat16 array to float array
996 | func Bf16toS(n int, in []Bfloat16, incIn int, out []float32, incOut int) {
997 | // FIXME: No symbol
998 | //C.cblas_sbf16tos(C.blasint(n), (*C.bfloat16)(unsafe.Pointer(&in[0])), C.blasint(incIn), (*C.float)(unsafe.Pointer(&out[0])), C.blasint(incOut))
999 | }
1000 |
1001 | // Convert bfloat16 array to double array
1002 | func Bf16toD(n int, in []Bfloat16, incIn int, out []float64, incOut int) {
1003 | // FIXME: No symbol
1004 | //C.cblas_dbf16tod(C.blasint(n), (*C.bfloat16)(unsafe.Pointer(&in[0])), C.blasint(incIn), (*C.double)(unsafe.Pointer(&out[0])), C.blasint(incOut))
1005 | }
1006 |
1007 | // Compute the dot product of two bfloat16 vectors
1008 | func SbDot(n int, x []Bfloat16, incx int, y []Bfloat16, incy int) float32 {
1009 | // FIXME: No symbol
1010 | //return float32(C.cblas_sbdot(C.blasint(n), (*C.bfloat16)(unsafe.Pointer(&x[0])), C.blasint(incx), (*C.bfloat16)(unsafe.Pointer(&y[0])), C.blasint(incy)))
1011 | return float32(0)
1012 | }
1013 |
1014 | // Performs a matrix-vector multiplication with a bfloat16 matrix and a float vector
1015 | func SbGemv(order Order, trans Transpose, m, n int, alpha float32, a []Bfloat16, lda int, x []Bfloat16, incx int, beta float32, y []float32, incy int) {
1016 | // FIXME: No symbol
1017 | //C.cblas_sbgemv(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_TRANSPOSE(trans), C.blasint(m), C.blasint(n), C.float(alpha), (*C.bfloat16)(unsafe.Pointer(&a[0])), C.blasint(lda), (*C.bfloat16)(unsafe.Pointer(&x[0])), C.blasint(incx), C.float(beta), (*C.float)(unsafe.Pointer(&y[0])), C.blasint(incy))
1018 | }
1019 |
1020 | // Performs a matrix-matrix multiplication with bfloat16 matrices and a float output matrix
1021 | func SbGemM(order Order, transA, transB Transpose, m, n, k int, alpha float32, a []Bfloat16, lda int, b []Bfloat16, ldb int, beta float32, c []float32, ldc int) {
1022 | // FIXME: No symbol
1023 | //C.cblas_sbgemm(C.enum_CBLAS_ORDER(order), C.enum_CBLAS_TRANSPOSE(transA), C.enum_CBLAS_TRANSPOSE(transB), C.blasint(m), C.blasint(n), C.blasint(k), C.float(alpha), (*C.bfloat16)(unsafe.Pointer(&a[0])), C.blasint(lda), (*C.bfloat16)(unsafe.Pointer(&b[0])), C.blasint(ldb), C.float(beta), (*C.float)(unsafe.Pointer(&c[0])), C.blasint(ldc))
1024 | }
1025 |
--------------------------------------------------------------------------------