1#![allow(non_camel_case_types)]
9#![no_std]
10
11extern crate libc;
12
13use libc::{c_char, c_double, c_float, c_int};
14
15#[allow(bad_style)]
17pub type c_double_complex = [libc::c_double; 2];
18
19#[allow(bad_style)]
21pub type c_float_complex = [libc::c_float; 2];
22
23pub type CBLAS_INDEX = c_int;
24
25#[repr(C)]
26#[derive(Clone, Copy, Debug)]
27pub enum CBLAS_LAYOUT {
28 CblasRowMajor = 101,
29 CblasColMajor = 102,
30}
31pub use self::CBLAS_LAYOUT::*;
32
33#[repr(C)]
34#[derive(Clone, Copy, Debug)]
35pub enum CBLAS_TRANSPOSE {
36 CblasNoTrans = 111,
37 CblasTrans = 112,
38 CblasConjTrans = 113,
39}
40pub use self::CBLAS_TRANSPOSE::*;
41
42#[repr(C)]
43#[derive(Clone, Copy, Debug)]
44pub enum CBLAS_UPLO {
45 CblasUpper = 121,
46 CblasLower = 122,
47}
48pub use self::CBLAS_UPLO::*;
49
50#[repr(C)]
51#[derive(Clone, Copy, Debug)]
52pub enum CBLAS_DIAG {
53 CblasNonUnit = 131,
54 CblasUnit = 132,
55}
56pub use self::CBLAS_DIAG::*;
57
58#[repr(C)]
59#[derive(Clone, Copy, Debug)]
60pub enum CBLAS_SIDE {
61 CblasLeft = 141,
62 CblasRight = 142,
63}
64pub use self::CBLAS_SIDE::*;
65
66pub type CBLAS_ORDER = CBLAS_LAYOUT;
67
68extern "C" {
70 pub fn cblas_dcabs1(z: *const c_double_complex) -> c_double;
71 pub fn cblas_scabs1(c: *const c_float_complex) -> c_float;
72
73 pub fn cblas_sdsdot(
74 n: c_int,
75 alpha: c_float,
76 x: *const c_float,
77 incx: c_int,
78 y: *const c_float,
79 incy: c_int,
80 ) -> c_float;
81 pub fn cblas_dsdot(
82 n: c_int,
83 x: *const c_float,
84 incx: c_int,
85 y: *const c_float,
86 incy: c_int,
87 ) -> c_double;
88 pub fn cblas_sdot(
89 n: c_int,
90 x: *const c_float,
91 incx: c_int,
92 y: *const c_float,
93 incy: c_int,
94 ) -> c_float;
95 pub fn cblas_ddot(
96 n: c_int,
97 x: *const c_double,
98 incx: c_int,
99 y: *const c_double,
100 incy: c_int,
101 ) -> c_double;
102
103 pub fn cblas_cdotu_sub(
105 n: c_int,
106 x: *const c_float_complex,
107 incx: c_int,
108 y: *const c_float_complex,
109 incy: c_int,
110 dotu: *mut c_float_complex,
111 );
112 pub fn cblas_cdotc_sub(
113 n: c_int,
114 x: *const c_float_complex,
115 incx: c_int,
116 y: *const c_float_complex,
117 incy: c_int,
118 dotc: *mut c_float_complex,
119 );
120
121 pub fn cblas_zdotu_sub(
122 n: c_int,
123 x: *const c_double_complex,
124 incx: c_int,
125 y: *const c_double_complex,
126 incy: c_int,
127 dotu: *mut c_double_complex,
128 );
129 pub fn cblas_zdotc_sub(
130 n: c_int,
131 x: *const c_double_complex,
132 incx: c_int,
133 y: *const c_double_complex,
134 incy: c_int,
135 dotc: *mut c_double_complex,
136 );
137
138 pub fn cblas_snrm2(n: c_int, x: *const c_float, incx: c_int) -> c_float;
140 pub fn cblas_sasum(n: c_int, x: *const c_float, incx: c_int) -> c_float;
141
142 pub fn cblas_dnrm2(n: c_int, x: *const c_double, incx: c_int) -> c_double;
143 pub fn cblas_dasum(n: c_int, x: *const c_double, incx: c_int) -> c_double;
144
145 pub fn cblas_scnrm2(n: c_int, x: *const c_float_complex, incx: c_int) -> c_float;
146 pub fn cblas_scasum(n: c_int, x: *const c_float_complex, incx: c_int) -> c_float;
147
148 pub fn cblas_dznrm2(n: c_int, x: *const c_double_complex, incx: c_int) -> c_double;
149 pub fn cblas_dzasum(n: c_int, x: *const c_double_complex, incx: c_int) -> c_double;
150
151 pub fn cblas_isamax(n: c_int, x: *const c_float, incx: c_int) -> CBLAS_INDEX;
153 pub fn cblas_idamax(n: c_int, x: *const c_double, incx: c_int) -> CBLAS_INDEX;
154 pub fn cblas_icamax(n: c_int, x: *const c_float_complex, incx: c_int) -> CBLAS_INDEX;
155 pub fn cblas_izamax(n: c_int, x: *const c_double_complex, incx: c_int) -> CBLAS_INDEX;
156}
157
158extern "C" {
160 pub fn cblas_sswap(n: c_int, x: *mut c_float, incx: c_int, y: *mut c_float, incy: c_int);
162 pub fn cblas_scopy(n: c_int, x: *const c_float, incx: c_int, y: *mut c_float, incy: c_int);
163 pub fn cblas_saxpy(
164 n: c_int,
165 alpha: c_float,
166 x: *const c_float,
167 incx: c_int,
168 y: *mut c_float,
169 incy: c_int,
170 );
171
172 pub fn cblas_dswap(n: c_int, x: *mut c_double, incx: c_int, y: *mut c_double, incy: c_int);
173 pub fn cblas_dcopy(n: c_int, x: *const c_double, incx: c_int, y: *mut c_double, incy: c_int);
174 pub fn cblas_daxpy(
175 n: c_int,
176 alpha: c_double,
177 x: *const c_double,
178 incx: c_int,
179 y: *mut c_double,
180 incy: c_int,
181 );
182
183 pub fn cblas_cswap(
184 n: c_int,
185 x: *mut c_float_complex,
186 incx: c_int,
187 y: *mut c_float_complex,
188 incy: c_int,
189 );
190 pub fn cblas_ccopy(
191 n: c_int,
192 x: *const c_float_complex,
193 incx: c_int,
194 y: *mut c_float_complex,
195 incy: c_int,
196 );
197 pub fn cblas_caxpy(
198 n: c_int,
199 alpha: *const c_float_complex,
200 x: *const c_float_complex,
201 incx: c_int,
202 y: *mut c_float_complex,
203 incy: c_int,
204 );
205
206 pub fn cblas_zswap(
207 n: c_int,
208 x: *mut c_double_complex,
209 incx: c_int,
210 y: *mut c_double_complex,
211 incy: c_int,
212 );
213 pub fn cblas_zcopy(
214 n: c_int,
215 x: *const c_double_complex,
216 incx: c_int,
217 y: *mut c_double_complex,
218 incy: c_int,
219 );
220 pub fn cblas_zaxpy(
221 n: c_int,
222 alpha: *const c_double_complex,
223 x: *const c_double_complex,
224 incx: c_int,
225 y: *mut c_double_complex,
226 incy: c_int,
227 );
228
229 pub fn cblas_srotg(a: *mut c_float, b: *mut c_float, c: *mut c_float, s: *mut c_float);
231 pub fn cblas_srotmg(
232 d1: *mut c_float,
233 d2: *mut c_float,
234 b1: *mut c_float,
235 b2: c_float,
236 p: *mut c_float,
237 );
238 pub fn cblas_srot(
239 n: c_int,
240 x: *mut c_float,
241 incx: c_int,
242 y: *mut c_float,
243 incy: c_int,
244 c: c_float,
245 s: c_float,
246 );
247 pub fn cblas_srotm(
248 n: c_int,
249 x: *mut c_float,
250 incx: c_int,
251 y: *mut c_float,
252 incy: c_int,
253 p: *const c_float,
254 );
255
256 pub fn cblas_drotg(a: *mut c_double, b: *mut c_double, c: *mut c_double, s: *mut c_double);
257 pub fn cblas_drotmg(
258 d1: *mut c_double,
259 d2: *mut c_double,
260 b1: *mut c_double,
261 b2: c_double,
262 p: *mut c_double,
263 );
264 pub fn cblas_drot(
265 n: c_int,
266 x: *mut c_double,
267 incx: c_int,
268 y: *mut c_double,
269 incy: c_int,
270 c: c_double,
271 s: c_double,
272 );
273 pub fn cblas_drotm(
274 n: c_int,
275 x: *mut c_double,
276 incx: c_int,
277 y: *mut c_double,
278 incy: c_int,
279 p: *const c_double,
280 );
281
282 pub fn cblas_sscal(n: c_int, alpha: c_float, x: *mut c_float, incx: c_int);
284 pub fn cblas_dscal(n: c_int, alpha: c_double, x: *mut c_double, incx: c_int);
285 pub fn cblas_cscal(
286 n: c_int,
287 alpha: *const c_float_complex,
288 x: *mut c_float_complex,
289 incx: c_int,
290 );
291 pub fn cblas_zscal(
292 n: c_int,
293 alpha: *const c_double_complex,
294 x: *mut c_double_complex,
295 incx: c_int,
296 );
297 pub fn cblas_csscal(n: c_int, alpha: c_float, x: *mut c_float_complex, incx: c_int);
298 pub fn cblas_zdscal(n: c_int, alpha: c_double, x: *mut c_double_complex, incx: c_int);
299}
300
301extern "C" {
303 pub fn cblas_sgemv(
305 layout: CBLAS_LAYOUT,
306 transa: CBLAS_TRANSPOSE,
307 m: c_int,
308 n: c_int,
309 alpha: c_float,
310 a: *const c_float,
311 lda: c_int,
312 x: *const c_float,
313 incx: c_int,
314 beta: c_float,
315 y: *mut c_float,
316 incy: c_int,
317 );
318 pub fn cblas_sgbmv(
319 layout: CBLAS_LAYOUT,
320 transa: CBLAS_TRANSPOSE,
321 m: c_int,
322 n: c_int,
323 kl: c_int,
324 ku: c_int,
325 alpha: c_float,
326 a: *const c_float,
327 lda: c_int,
328 x: *const c_float,
329 incx: c_int,
330 beta: c_float,
331 y: *mut c_float,
332 incy: c_int,
333 );
334 pub fn cblas_strmv(
335 layout: CBLAS_LAYOUT,
336 uplo: CBLAS_UPLO,
337 transa: CBLAS_TRANSPOSE,
338 diag: CBLAS_DIAG,
339 n: c_int,
340 a: *const c_float,
341 lda: c_int,
342 x: *mut c_float,
343 incx: c_int,
344 );
345 pub fn cblas_stbmv(
346 layout: CBLAS_LAYOUT,
347 uplo: CBLAS_UPLO,
348 transa: CBLAS_TRANSPOSE,
349 diag: CBLAS_DIAG,
350 n: c_int,
351 k: c_int,
352 a: *const c_float,
353 lda: c_int,
354 x: *mut c_float,
355 incx: c_int,
356 );
357 pub fn cblas_stpmv(
358 layout: CBLAS_LAYOUT,
359 uplo: CBLAS_UPLO,
360 transa: CBLAS_TRANSPOSE,
361 diag: CBLAS_DIAG,
362 n: c_int,
363 ap: *const c_float,
364 x: *mut c_float,
365 incx: c_int,
366 );
367 pub fn cblas_strsv(
368 layout: CBLAS_LAYOUT,
369 uplo: CBLAS_UPLO,
370 transa: CBLAS_TRANSPOSE,
371 diag: CBLAS_DIAG,
372 n: c_int,
373 a: *const c_float,
374 lda: c_int,
375 x: *mut c_float,
376 incx: c_int,
377 );
378 pub fn cblas_stbsv(
379 layout: CBLAS_LAYOUT,
380 uplo: CBLAS_UPLO,
381 transa: CBLAS_TRANSPOSE,
382 diag: CBLAS_DIAG,
383 n: c_int,
384 k: c_int,
385 a: *const c_float,
386 lda: c_int,
387 x: *mut c_float,
388 incx: c_int,
389 );
390 pub fn cblas_stpsv(
391 layout: CBLAS_LAYOUT,
392 uplo: CBLAS_UPLO,
393 transa: CBLAS_TRANSPOSE,
394 diag: CBLAS_DIAG,
395 n: c_int,
396 ap: *const c_float,
397 x: *mut c_float,
398 incx: c_int,
399 );
400
401 pub fn cblas_dgemv(
402 layout: CBLAS_LAYOUT,
403 transa: CBLAS_TRANSPOSE,
404 m: c_int,
405 n: c_int,
406 alpha: c_double,
407 a: *const c_double,
408 lda: c_int,
409 x: *const c_double,
410 incx: c_int,
411 beta: c_double,
412 y: *mut c_double,
413 incy: c_int,
414 );
415 pub fn cblas_dgbmv(
416 layout: CBLAS_LAYOUT,
417 transa: CBLAS_TRANSPOSE,
418 m: c_int,
419 n: c_int,
420 kl: c_int,
421 ku: c_int,
422 alpha: c_double,
423 a: *const c_double,
424 lda: c_int,
425 x: *const c_double,
426 incx: c_int,
427 beta: c_double,
428 y: *mut c_double,
429 incy: c_int,
430 );
431 pub fn cblas_dtrmv(
432 layout: CBLAS_LAYOUT,
433 uplo: CBLAS_UPLO,
434 transa: CBLAS_TRANSPOSE,
435 diag: CBLAS_DIAG,
436 n: c_int,
437 a: *const c_double,
438 lda: c_int,
439 x: *mut c_double,
440 incx: c_int,
441 );
442 pub fn cblas_dtbmv(
443 layout: CBLAS_LAYOUT,
444 uplo: CBLAS_UPLO,
445 transa: CBLAS_TRANSPOSE,
446 diag: CBLAS_DIAG,
447 n: c_int,
448 k: c_int,
449 a: *const c_double,
450 lda: c_int,
451 x: *mut c_double,
452 incx: c_int,
453 );
454 pub fn cblas_dtpmv(
455 layout: CBLAS_LAYOUT,
456 uplo: CBLAS_UPLO,
457 transa: CBLAS_TRANSPOSE,
458 diag: CBLAS_DIAG,
459 n: c_int,
460 ap: *const c_double,
461 x: *mut c_double,
462 incx: c_int,
463 );
464 pub fn cblas_dtrsv(
465 layout: CBLAS_LAYOUT,
466 uplo: CBLAS_UPLO,
467 transa: CBLAS_TRANSPOSE,
468 diag: CBLAS_DIAG,
469 n: c_int,
470 a: *const c_double,
471 lda: c_int,
472 x: *mut c_double,
473 incx: c_int,
474 );
475 pub fn cblas_dtbsv(
476 layout: CBLAS_LAYOUT,
477 uplo: CBLAS_UPLO,
478 transa: CBLAS_TRANSPOSE,
479 diag: CBLAS_DIAG,
480 n: c_int,
481 k: c_int,
482 a: *const c_double,
483 lda: c_int,
484 x: *mut c_double,
485 incx: c_int,
486 );
487 pub fn cblas_dtpsv(
488 layout: CBLAS_LAYOUT,
489 uplo: CBLAS_UPLO,
490 transa: CBLAS_TRANSPOSE,
491 diag: CBLAS_DIAG,
492 n: c_int,
493 ap: *const c_double,
494 x: *mut c_double,
495 incx: c_int,
496 );
497
498 pub fn cblas_cgemv(
499 layout: CBLAS_LAYOUT,
500 transa: CBLAS_TRANSPOSE,
501 m: c_int,
502 n: c_int,
503 alpha: *const c_float_complex,
504 a: *const c_float_complex,
505 lda: c_int,
506 x: *const c_float_complex,
507 incx: c_int,
508 beta: *const c_float_complex,
509 y: *mut c_float_complex,
510 incy: c_int,
511 );
512 pub fn cblas_cgbmv(
513 layout: CBLAS_LAYOUT,
514 transa: CBLAS_TRANSPOSE,
515 m: c_int,
516 n: c_int,
517 kl: c_int,
518 ku: c_int,
519 alpha: *const c_float_complex,
520 a: *const c_float_complex,
521 lda: c_int,
522 x: *const c_float_complex,
523 incx: c_int,
524 beta: *const c_float_complex,
525 y: *mut c_float_complex,
526 incy: c_int,
527 );
528 pub fn cblas_ctrmv(
529 layout: CBLAS_LAYOUT,
530 uplo: CBLAS_UPLO,
531 transa: CBLAS_TRANSPOSE,
532 diag: CBLAS_DIAG,
533 n: c_int,
534 a: *const c_float_complex,
535 lda: c_int,
536 x: *mut c_float_complex,
537 incx: c_int,
538 );
539 pub fn cblas_ctbmv(
540 layout: CBLAS_LAYOUT,
541 uplo: CBLAS_UPLO,
542 transa: CBLAS_TRANSPOSE,
543 diag: CBLAS_DIAG,
544 n: c_int,
545 k: c_int,
546 a: *const c_float_complex,
547 lda: c_int,
548 x: *mut c_float_complex,
549 incx: c_int,
550 );
551 pub fn cblas_ctpmv(
552 layout: CBLAS_LAYOUT,
553 uplo: CBLAS_UPLO,
554 transa: CBLAS_TRANSPOSE,
555 diag: CBLAS_DIAG,
556 n: c_int,
557 ap: *const c_float_complex,
558 x: *mut c_float_complex,
559 incx: c_int,
560 );
561 pub fn cblas_ctrsv(
562 layout: CBLAS_LAYOUT,
563 uplo: CBLAS_UPLO,
564 transa: CBLAS_TRANSPOSE,
565 diag: CBLAS_DIAG,
566 n: c_int,
567 a: *const c_float_complex,
568 lda: c_int,
569 x: *mut c_float_complex,
570 incx: c_int,
571 );
572 pub fn cblas_ctbsv(
573 layout: CBLAS_LAYOUT,
574 uplo: CBLAS_UPLO,
575 transa: CBLAS_TRANSPOSE,
576 diag: CBLAS_DIAG,
577 n: c_int,
578 k: c_int,
579 a: *const c_float_complex,
580 lda: c_int,
581 x: *mut c_float_complex,
582 incx: c_int,
583 );
584 pub fn cblas_ctpsv(
585 layout: CBLAS_LAYOUT,
586 uplo: CBLAS_UPLO,
587 transa: CBLAS_TRANSPOSE,
588 diag: CBLAS_DIAG,
589 n: c_int,
590 ap: *const c_float_complex,
591 x: *mut c_float_complex,
592 incx: c_int,
593 );
594
595 pub fn cblas_zgemv(
596 layout: CBLAS_LAYOUT,
597 transa: CBLAS_TRANSPOSE,
598 m: c_int,
599 n: c_int,
600 alpha: *const c_double_complex,
601 a: *const c_double_complex,
602 lda: c_int,
603 x: *const c_double_complex,
604 incx: c_int,
605 beta: *const c_double_complex,
606 y: *mut c_double_complex,
607 incy: c_int,
608 );
609 pub fn cblas_zgbmv(
610 layout: CBLAS_LAYOUT,
611 transa: CBLAS_TRANSPOSE,
612 m: c_int,
613 n: c_int,
614 kl: c_int,
615 ku: c_int,
616 alpha: *const c_double_complex,
617 a: *const c_double_complex,
618 lda: c_int,
619 x: *const c_double_complex,
620 incx: c_int,
621 beta: *const c_double_complex,
622 y: *mut c_double_complex,
623 incy: c_int,
624 );
625 pub fn cblas_ztrmv(
626 layout: CBLAS_LAYOUT,
627 uplo: CBLAS_UPLO,
628 transa: CBLAS_TRANSPOSE,
629 diag: CBLAS_DIAG,
630 n: c_int,
631 a: *const c_double_complex,
632 lda: c_int,
633 x: *mut c_double_complex,
634 incx: c_int,
635 );
636 pub fn cblas_ztbmv(
637 layout: CBLAS_LAYOUT,
638 uplo: CBLAS_UPLO,
639 transa: CBLAS_TRANSPOSE,
640 diag: CBLAS_DIAG,
641 n: c_int,
642 k: c_int,
643 a: *const c_double_complex,
644 lda: c_int,
645 x: *mut c_double_complex,
646 incx: c_int,
647 );
648 pub fn cblas_ztpmv(
649 layout: CBLAS_LAYOUT,
650 uplo: CBLAS_UPLO,
651 transa: CBLAS_TRANSPOSE,
652 diag: CBLAS_DIAG,
653 n: c_int,
654 ap: *const c_double_complex,
655 x: *mut c_double_complex,
656 incx: c_int,
657 );
658 pub fn cblas_ztrsv(
659 layout: CBLAS_LAYOUT,
660 uplo: CBLAS_UPLO,
661 transa: CBLAS_TRANSPOSE,
662 diag: CBLAS_DIAG,
663 n: c_int,
664 a: *const c_double_complex,
665 lda: c_int,
666 x: *mut c_double_complex,
667 incx: c_int,
668 );
669 pub fn cblas_ztbsv(
670 layout: CBLAS_LAYOUT,
671 uplo: CBLAS_UPLO,
672 transa: CBLAS_TRANSPOSE,
673 diag: CBLAS_DIAG,
674 n: c_int,
675 k: c_int,
676 a: *const c_double_complex,
677 lda: c_int,
678 x: *mut c_double_complex,
679 incx: c_int,
680 );
681 pub fn cblas_ztpsv(
682 layout: CBLAS_LAYOUT,
683 uplo: CBLAS_UPLO,
684 transa: CBLAS_TRANSPOSE,
685 diag: CBLAS_DIAG,
686 n: c_int,
687 ap: *const c_double_complex,
688 x: *mut c_double_complex,
689 incx: c_int,
690 );
691
692 pub fn cblas_ssymv(
694 layout: CBLAS_LAYOUT,
695 uplo: CBLAS_UPLO,
696 n: c_int,
697 alpha: c_float,
698 a: *const c_float,
699 lda: c_int,
700 x: *const c_float,
701 incx: c_int,
702 beta: c_float,
703 y: *mut c_float,
704 incy: c_int,
705 );
706 pub fn cblas_ssbmv(
707 layout: CBLAS_LAYOUT,
708 uplo: CBLAS_UPLO,
709 n: c_int,
710 k: c_int,
711 alpha: c_float,
712 a: *const c_float,
713 lda: c_int,
714 x: *const c_float,
715 incx: c_int,
716 beta: c_float,
717 y: *mut c_float,
718 incy: c_int,
719 );
720 pub fn cblas_sspmv(
721 layout: CBLAS_LAYOUT,
722 uplo: CBLAS_UPLO,
723 n: c_int,
724 alpha: c_float,
725 ap: *const c_float,
726 x: *const c_float,
727 incx: c_int,
728 beta: c_float,
729 y: *mut c_float,
730 incy: c_int,
731 );
732 pub fn cblas_sger(
733 layout: CBLAS_LAYOUT,
734 m: c_int,
735 n: c_int,
736 alpha: c_float,
737 x: *const c_float,
738 incx: c_int,
739 y: *const c_float,
740 incy: c_int,
741 a: *mut c_float,
742 lda: c_int,
743 );
744 pub fn cblas_ssyr(
745 layout: CBLAS_LAYOUT,
746 uplo: CBLAS_UPLO,
747 n: c_int,
748 alpha: c_float,
749 x: *const c_float,
750 incx: c_int,
751 a: *mut c_float,
752 lda: c_int,
753 );
754 pub fn cblas_sspr(
755 layout: CBLAS_LAYOUT,
756 uplo: CBLAS_UPLO,
757 n: c_int,
758 alpha: c_float,
759 x: *const c_float,
760 incx: c_int,
761 ap: *mut c_float,
762 );
763 pub fn cblas_ssyr2(
764 layout: CBLAS_LAYOUT,
765 uplo: CBLAS_UPLO,
766 n: c_int,
767 alpha: c_float,
768 x: *const c_float,
769 incx: c_int,
770 y: *const c_float,
771 incy: c_int,
772 a: *mut c_float,
773 lda: c_int,
774 );
775 pub fn cblas_sspr2(
776 layout: CBLAS_LAYOUT,
777 uplo: CBLAS_UPLO,
778 n: c_int,
779 alpha: c_float,
780 x: *const c_float,
781 incx: c_int,
782 y: *const c_float,
783 incy: c_int,
784 a: *mut c_float,
785 );
786
787 pub fn cblas_dsymv(
788 layout: CBLAS_LAYOUT,
789 uplo: CBLAS_UPLO,
790 n: c_int,
791 alpha: c_double,
792 a: *const c_double,
793 lda: c_int,
794 x: *const c_double,
795 incx: c_int,
796 beta: c_double,
797 y: *mut c_double,
798 incy: c_int,
799 );
800 pub fn cblas_dsbmv(
801 layout: CBLAS_LAYOUT,
802 uplo: CBLAS_UPLO,
803 n: c_int,
804 k: c_int,
805 alpha: c_double,
806 a: *const c_double,
807 lda: c_int,
808 x: *const c_double,
809 incx: c_int,
810 beta: c_double,
811 y: *mut c_double,
812 incy: c_int,
813 );
814 pub fn cblas_dspmv(
815 layout: CBLAS_LAYOUT,
816 uplo: CBLAS_UPLO,
817 n: c_int,
818 alpha: c_double,
819 ap: *const c_double,
820 x: *const c_double,
821 incx: c_int,
822 beta: c_double,
823 y: *mut c_double,
824 incy: c_int,
825 );
826 pub fn cblas_dger(
827 layout: CBLAS_LAYOUT,
828 m: c_int,
829 n: c_int,
830 alpha: c_double,
831 x: *const c_double,
832 incx: c_int,
833 y: *const c_double,
834 incy: c_int,
835 a: *mut c_double,
836 lda: c_int,
837 );
838 pub fn cblas_dsyr(
839 layout: CBLAS_LAYOUT,
840 uplo: CBLAS_UPLO,
841 n: c_int,
842 alpha: c_double,
843 x: *const c_double,
844 incx: c_int,
845 a: *mut c_double,
846 lda: c_int,
847 );
848 pub fn cblas_dspr(
849 layout: CBLAS_LAYOUT,
850 uplo: CBLAS_UPLO,
851 n: c_int,
852 alpha: c_double,
853 x: *const c_double,
854 incx: c_int,
855 ap: *mut c_double,
856 );
857 pub fn cblas_dsyr2(
858 layout: CBLAS_LAYOUT,
859 uplo: CBLAS_UPLO,
860 n: c_int,
861 alpha: c_double,
862 x: *const c_double,
863 incx: c_int,
864 y: *const c_double,
865 incy: c_int,
866 a: *mut c_double,
867 lda: c_int,
868 );
869 pub fn cblas_dspr2(
870 layout: CBLAS_LAYOUT,
871 uplo: CBLAS_UPLO,
872 n: c_int,
873 alpha: c_double,
874 x: *const c_double,
875 incx: c_int,
876 y: *const c_double,
877 incy: c_int,
878 a: *mut c_double,
879 );
880
881 pub fn cblas_chemv(
883 layout: CBLAS_LAYOUT,
884 uplo: CBLAS_UPLO,
885 n: c_int,
886 alpha: *const c_float_complex,
887 a: *const c_float_complex,
888 lda: c_int,
889 x: *const c_float_complex,
890 incx: c_int,
891 beta: *const c_float_complex,
892 y: *mut c_float_complex,
893 incy: c_int,
894 );
895 pub fn cblas_chbmv(
896 layout: CBLAS_LAYOUT,
897 uplo: CBLAS_UPLO,
898 n: c_int,
899 k: c_int,
900 alpha: *const c_float_complex,
901 a: *const c_float_complex,
902 lda: c_int,
903 x: *const c_float_complex,
904 incx: c_int,
905 beta: *const c_float_complex,
906 y: *mut c_float_complex,
907 incy: c_int,
908 );
909 pub fn cblas_chpmv(
910 layout: CBLAS_LAYOUT,
911 uplo: CBLAS_UPLO,
912 n: c_int,
913 alpha: *const c_float_complex,
914 ap: *const c_float_complex,
915 x: *const c_float_complex,
916 incx: c_int,
917 beta: *const c_float_complex,
918 y: *mut c_float_complex,
919 incy: c_int,
920 );
921 pub fn cblas_cgeru(
922 layout: CBLAS_LAYOUT,
923 m: c_int,
924 n: c_int,
925 alpha: *const c_float_complex,
926 x: *const c_float_complex,
927 incx: c_int,
928 y: *const c_float_complex,
929 incy: c_int,
930 a: *mut c_float_complex,
931 lda: c_int,
932 );
933 pub fn cblas_cgerc(
934 layout: CBLAS_LAYOUT,
935 m: c_int,
936 n: c_int,
937 alpha: *const c_float_complex,
938 x: *const c_float_complex,
939 incx: c_int,
940 y: *const c_float_complex,
941 incy: c_int,
942 a: *mut c_float_complex,
943 lda: c_int,
944 );
945 pub fn cblas_cher(
946 layout: CBLAS_LAYOUT,
947 uplo: CBLAS_UPLO,
948 n: c_int,
949 alpha: c_float,
950 x: *const c_float_complex,
951 incx: c_int,
952 a: *mut c_float_complex,
953 lda: c_int,
954 );
955 pub fn cblas_chpr(
956 layout: CBLAS_LAYOUT,
957 uplo: CBLAS_UPLO,
958 n: c_int,
959 alpha: c_float,
960 x: *const c_float_complex,
961 incx: c_int,
962 a: *mut c_float_complex,
963 );
964 pub fn cblas_cher2(
965 layout: CBLAS_LAYOUT,
966 uplo: CBLAS_UPLO,
967 n: c_int,
968 alpha: *const c_float_complex,
969 x: *const c_float_complex,
970 incx: c_int,
971 y: *const c_float_complex,
972 incy: c_int,
973 a: *mut c_float_complex,
974 lda: c_int,
975 );
976 pub fn cblas_chpr2(
977 layout: CBLAS_LAYOUT,
978 uplo: CBLAS_UPLO,
979 n: c_int,
980 alpha: *const c_float_complex,
981 x: *const c_float_complex,
982 incx: c_int,
983 y: *const c_float_complex,
984 incy: c_int,
985 ap: *mut c_float_complex,
986 );
987
988 pub fn cblas_zhemv(
989 layout: CBLAS_LAYOUT,
990 uplo: CBLAS_UPLO,
991 n: c_int,
992 alpha: *const c_double_complex,
993 a: *const c_double_complex,
994 lda: c_int,
995 x: *const c_double_complex,
996 incx: c_int,
997 beta: *const c_double_complex,
998 y: *mut c_double_complex,
999 incy: c_int,
1000 );
1001 pub fn cblas_zhbmv(
1002 layout: CBLAS_LAYOUT,
1003 uplo: CBLAS_UPLO,
1004 n: c_int,
1005 k: c_int,
1006 alpha: *const c_double_complex,
1007 a: *const c_double_complex,
1008 lda: c_int,
1009 x: *const c_double_complex,
1010 incx: c_int,
1011 beta: *const c_double_complex,
1012 y: *mut c_double_complex,
1013 incy: c_int,
1014 );
1015 pub fn cblas_zhpmv(
1016 layout: CBLAS_LAYOUT,
1017 uplo: CBLAS_UPLO,
1018 n: c_int,
1019 alpha: *const c_double_complex,
1020 ap: *const c_double_complex,
1021 x: *const c_double_complex,
1022 incx: c_int,
1023 beta: *const c_double_complex,
1024 y: *mut c_double_complex,
1025 incy: c_int,
1026 );
1027 pub fn cblas_zgeru(
1028 layout: CBLAS_LAYOUT,
1029 m: c_int,
1030 n: c_int,
1031 alpha: *const c_double_complex,
1032 x: *const c_double_complex,
1033 incx: c_int,
1034 y: *const c_double_complex,
1035 incy: c_int,
1036 a: *mut c_double_complex,
1037 lda: c_int,
1038 );
1039 pub fn cblas_zgerc(
1040 layout: CBLAS_LAYOUT,
1041 m: c_int,
1042 n: c_int,
1043 alpha: *const c_double_complex,
1044 x: *const c_double_complex,
1045 incx: c_int,
1046 y: *const c_double_complex,
1047 incy: c_int,
1048 a: *mut c_double_complex,
1049 lda: c_int,
1050 );
1051 pub fn cblas_zher(
1052 layout: CBLAS_LAYOUT,
1053 uplo: CBLAS_UPLO,
1054 n: c_int,
1055 alpha: c_double,
1056 x: *const c_double_complex,
1057 incx: c_int,
1058 a: *mut c_double_complex,
1059 lda: c_int,
1060 );
1061 pub fn cblas_zhpr(
1062 layout: CBLAS_LAYOUT,
1063 uplo: CBLAS_UPLO,
1064 n: c_int,
1065 alpha: c_double,
1066 x: *const c_double_complex,
1067 incx: c_int,
1068 a: *mut c_double_complex,
1069 );
1070 pub fn cblas_zher2(
1071 layout: CBLAS_LAYOUT,
1072 uplo: CBLAS_UPLO,
1073 n: c_int,
1074 alpha: *const c_double_complex,
1075 x: *const c_double_complex,
1076 incx: c_int,
1077 y: *const c_double_complex,
1078 incy: c_int,
1079 a: *mut c_double_complex,
1080 lda: c_int,
1081 );
1082 pub fn cblas_zhpr2(
1083 layout: CBLAS_LAYOUT,
1084 uplo: CBLAS_UPLO,
1085 n: c_int,
1086 alpha: *const c_double_complex,
1087 x: *const c_double_complex,
1088 incx: c_int,
1089 y: *const c_double_complex,
1090 incy: c_int,
1091 ap: *mut c_double_complex,
1092 );
1093}
1094
1095extern "C" {
1097 pub fn cblas_sgemm(
1099 layout: CBLAS_LAYOUT,
1100 transa: CBLAS_TRANSPOSE,
1101 transb: CBLAS_TRANSPOSE,
1102 m: c_int,
1103 n: c_int,
1104 k: c_int,
1105 alpha: c_float,
1106 a: *const c_float,
1107 lda: c_int,
1108 b: *const c_float,
1109 ldb: c_int,
1110 beta: c_float,
1111 c: *mut c_float,
1112 ldc: c_int,
1113 );
1114 pub fn cblas_ssymm(
1115 layout: CBLAS_LAYOUT,
1116 side: CBLAS_SIDE,
1117 uplo: CBLAS_UPLO,
1118 m: c_int,
1119 n: c_int,
1120 alpha: c_float,
1121 a: *const c_float,
1122 lda: c_int,
1123 b: *const c_float,
1124 ldb: c_int,
1125 beta: c_float,
1126 c: *mut c_float,
1127 ldc: c_int,
1128 );
1129 pub fn cblas_ssyrk(
1130 layout: CBLAS_LAYOUT,
1131 uplo: CBLAS_UPLO,
1132 trans: CBLAS_TRANSPOSE,
1133 n: c_int,
1134 k: c_int,
1135 alpha: c_float,
1136 a: *const c_float,
1137 lda: c_int,
1138 beta: c_float,
1139 c: *mut c_float,
1140 ldc: c_int,
1141 );
1142 pub fn cblas_ssyr2k(
1143 layout: CBLAS_LAYOUT,
1144 uplo: CBLAS_UPLO,
1145 trans: CBLAS_TRANSPOSE,
1146 n: c_int,
1147 k: c_int,
1148 alpha: c_float,
1149 a: *const c_float,
1150 lda: c_int,
1151 b: *const c_float,
1152 ldb: c_int,
1153 beta: c_float,
1154 c: *mut c_float,
1155 ldc: c_int,
1156 );
1157 pub fn cblas_strmm(
1158 layout: CBLAS_LAYOUT,
1159 side: CBLAS_SIDE,
1160 uplo: CBLAS_UPLO,
1161 transa: CBLAS_TRANSPOSE,
1162 diag: CBLAS_DIAG,
1163 m: c_int,
1164 n: c_int,
1165 alpha: c_float,
1166 a: *const c_float,
1167 lda: c_int,
1168 b: *mut c_float,
1169 ldb: c_int,
1170 );
1171 pub fn cblas_strsm(
1172 layout: CBLAS_LAYOUT,
1173 side: CBLAS_SIDE,
1174 uplo: CBLAS_UPLO,
1175 transa: CBLAS_TRANSPOSE,
1176 diag: CBLAS_DIAG,
1177 m: c_int,
1178 n: c_int,
1179 alpha: c_float,
1180 a: *const c_float,
1181 lda: c_int,
1182 b: *mut c_float,
1183 ldb: c_int,
1184 );
1185
1186 pub fn cblas_dgemm(
1187 layout: CBLAS_LAYOUT,
1188 transa: CBLAS_TRANSPOSE,
1189 transb: CBLAS_TRANSPOSE,
1190 m: c_int,
1191 n: c_int,
1192 k: c_int,
1193 alpha: c_double,
1194 a: *const c_double,
1195 lda: c_int,
1196 b: *const c_double,
1197 ldb: c_int,
1198 beta: c_double,
1199 c: *mut c_double,
1200 ldc: c_int,
1201 );
1202 pub fn cblas_dsymm(
1203 layout: CBLAS_LAYOUT,
1204 side: CBLAS_SIDE,
1205 uplo: CBLAS_UPLO,
1206 m: c_int,
1207 n: c_int,
1208 alpha: c_double,
1209 a: *const c_double,
1210 lda: c_int,
1211 b: *const c_double,
1212 ldb: c_int,
1213 beta: c_double,
1214 c: *mut c_double,
1215 ldc: c_int,
1216 );
1217 pub fn cblas_dsyrk(
1218 layout: CBLAS_LAYOUT,
1219 uplo: CBLAS_UPLO,
1220 trans: CBLAS_TRANSPOSE,
1221 n: c_int,
1222 k: c_int,
1223 alpha: c_double,
1224 a: *const c_double,
1225 lda: c_int,
1226 beta: c_double,
1227 c: *mut c_double,
1228 ldc: c_int,
1229 );
1230 pub fn cblas_dsyr2k(
1231 layout: CBLAS_LAYOUT,
1232 uplo: CBLAS_UPLO,
1233 trans: CBLAS_TRANSPOSE,
1234 n: c_int,
1235 k: c_int,
1236 alpha: c_double,
1237 a: *const c_double,
1238 lda: c_int,
1239 b: *const c_double,
1240 ldb: c_int,
1241 beta: c_double,
1242 c: *mut c_double,
1243 ldc: c_int,
1244 );
1245 pub fn cblas_dtrmm(
1246 layout: CBLAS_LAYOUT,
1247 side: CBLAS_SIDE,
1248 uplo: CBLAS_UPLO,
1249 transa: CBLAS_TRANSPOSE,
1250 diag: CBLAS_DIAG,
1251 m: c_int,
1252 n: c_int,
1253 alpha: c_double,
1254 a: *const c_double,
1255 lda: c_int,
1256 b: *mut c_double,
1257 ldb: c_int,
1258 );
1259 pub fn cblas_dtrsm(
1260 layout: CBLAS_LAYOUT,
1261 side: CBLAS_SIDE,
1262 uplo: CBLAS_UPLO,
1263 transa: CBLAS_TRANSPOSE,
1264 diag: CBLAS_DIAG,
1265 m: c_int,
1266 n: c_int,
1267 alpha: c_double,
1268 a: *const c_double,
1269 lda: c_int,
1270 b: *mut c_double,
1271 ldb: c_int,
1272 );
1273
1274 pub fn cblas_cgemm(
1275 layout: CBLAS_LAYOUT,
1276 transa: CBLAS_TRANSPOSE,
1277 transb: CBLAS_TRANSPOSE,
1278 m: c_int,
1279 n: c_int,
1280 k: c_int,
1281 alpha: *const c_float_complex,
1282 a: *const c_float_complex,
1283 lda: c_int,
1284 b: *const c_float_complex,
1285 ldb: c_int,
1286 beta: *const c_float_complex,
1287 c: *mut c_float_complex,
1288 ldc: c_int,
1289 );
1290 pub fn cblas_csymm(
1291 layout: CBLAS_LAYOUT,
1292 side: CBLAS_SIDE,
1293 uplo: CBLAS_UPLO,
1294 m: c_int,
1295 n: c_int,
1296 alpha: *const c_float_complex,
1297 a: *const c_float_complex,
1298 lda: c_int,
1299 b: *const c_float_complex,
1300 ldb: c_int,
1301 beta: *const c_float_complex,
1302 c: *mut c_float_complex,
1303 ldc: c_int,
1304 );
1305 pub fn cblas_csyrk(
1306 layout: CBLAS_LAYOUT,
1307 uplo: CBLAS_UPLO,
1308 trans: CBLAS_TRANSPOSE,
1309 n: c_int,
1310 k: c_int,
1311 alpha: *const c_float_complex,
1312 a: *const c_float_complex,
1313 lda: c_int,
1314 beta: *const c_float_complex,
1315 c: *mut c_float_complex,
1316 ldc: c_int,
1317 );
1318 pub fn cblas_csyr2k(
1319 layout: CBLAS_LAYOUT,
1320 uplo: CBLAS_UPLO,
1321 trans: CBLAS_TRANSPOSE,
1322 n: c_int,
1323 k: c_int,
1324 alpha: *const c_float_complex,
1325 a: *const c_float_complex,
1326 lda: c_int,
1327 b: *const c_float_complex,
1328 ldb: c_int,
1329 beta: *const c_float_complex,
1330 c: *mut c_float_complex,
1331 ldc: c_int,
1332 );
1333 pub fn cblas_ctrmm(
1334 layout: CBLAS_LAYOUT,
1335 side: CBLAS_SIDE,
1336 uplo: CBLAS_UPLO,
1337 transa: CBLAS_TRANSPOSE,
1338 diag: CBLAS_DIAG,
1339 m: c_int,
1340 n: c_int,
1341 alpha: *const c_float_complex,
1342 a: *const c_float_complex,
1343 lda: c_int,
1344 b: *mut c_float_complex,
1345 ldb: c_int,
1346 );
1347 pub fn cblas_ctrsm(
1348 layout: CBLAS_LAYOUT,
1349 side: CBLAS_SIDE,
1350 uplo: CBLAS_UPLO,
1351 transa: CBLAS_TRANSPOSE,
1352 diag: CBLAS_DIAG,
1353 m: c_int,
1354 n: c_int,
1355 alpha: *const c_float_complex,
1356 a: *const c_float_complex,
1357 lda: c_int,
1358 b: *mut c_float_complex,
1359 ldb: c_int,
1360 );
1361
1362 pub fn cblas_zgemm(
1363 layout: CBLAS_LAYOUT,
1364 transa: CBLAS_TRANSPOSE,
1365 transb: CBLAS_TRANSPOSE,
1366 m: c_int,
1367 n: c_int,
1368 k: c_int,
1369 alpha: *const c_double_complex,
1370 a: *const c_double_complex,
1371 lda: c_int,
1372 b: *const c_double_complex,
1373 ldb: c_int,
1374 beta: *const c_double_complex,
1375 c: *mut c_double_complex,
1376 ldc: c_int,
1377 );
1378 pub fn cblas_zsymm(
1379 layout: CBLAS_LAYOUT,
1380 side: CBLAS_SIDE,
1381 uplo: CBLAS_UPLO,
1382 m: c_int,
1383 n: c_int,
1384 alpha: *const c_double_complex,
1385 a: *const c_double_complex,
1386 lda: c_int,
1387 b: *const c_double_complex,
1388 ldb: c_int,
1389 beta: *const c_double_complex,
1390 c: *mut c_double_complex,
1391 ldc: c_int,
1392 );
1393 pub fn cblas_zsyrk(
1394 layout: CBLAS_LAYOUT,
1395 uplo: CBLAS_UPLO,
1396 trans: CBLAS_TRANSPOSE,
1397 n: c_int,
1398 k: c_int,
1399 alpha: *const c_double_complex,
1400 a: *const c_double_complex,
1401 lda: c_int,
1402 beta: *const c_double_complex,
1403 c: *mut c_double_complex,
1404 ldc: c_int,
1405 );
1406 pub fn cblas_zsyr2k(
1407 layout: CBLAS_LAYOUT,
1408 uplo: CBLAS_UPLO,
1409 trans: CBLAS_TRANSPOSE,
1410 n: c_int,
1411 k: c_int,
1412 alpha: *const c_double_complex,
1413 a: *const c_double_complex,
1414 lda: c_int,
1415 b: *const c_double_complex,
1416 ldb: c_int,
1417 beta: *const c_double_complex,
1418 c: *mut c_double_complex,
1419 ldc: c_int,
1420 );
1421 pub fn cblas_ztrmm(
1422 layout: CBLAS_LAYOUT,
1423 side: CBLAS_SIDE,
1424 uplo: CBLAS_UPLO,
1425 transa: CBLAS_TRANSPOSE,
1426 diag: CBLAS_DIAG,
1427 m: c_int,
1428 n: c_int,
1429 alpha: *const c_double_complex,
1430 a: *const c_double_complex,
1431 lda: c_int,
1432 b: *mut c_double_complex,
1433 ldb: c_int,
1434 );
1435 pub fn cblas_ztrsm(
1436 layout: CBLAS_LAYOUT,
1437 side: CBLAS_SIDE,
1438 uplo: CBLAS_UPLO,
1439 transa: CBLAS_TRANSPOSE,
1440 diag: CBLAS_DIAG,
1441 m: c_int,
1442 n: c_int,
1443 alpha: *const c_double_complex,
1444 a: *const c_double_complex,
1445 lda: c_int,
1446 b: *mut c_double_complex,
1447 ldb: c_int,
1448 );
1449
1450 pub fn cblas_chemm(
1452 layout: CBLAS_LAYOUT,
1453 side: CBLAS_SIDE,
1454 uplo: CBLAS_UPLO,
1455 m: c_int,
1456 n: c_int,
1457 alpha: *const c_float_complex,
1458 a: *const c_float_complex,
1459 lda: c_int,
1460 b: *const c_float_complex,
1461 ldb: c_int,
1462 beta: *const c_float_complex,
1463 c: *mut c_float_complex,
1464 ldc: c_int,
1465 );
1466 pub fn cblas_cherk(
1467 layout: CBLAS_LAYOUT,
1468 uplo: CBLAS_UPLO,
1469 trans: CBLAS_TRANSPOSE,
1470 n: c_int,
1471 k: c_int,
1472 alpha: c_float,
1473 a: *const c_float_complex,
1474 lda: c_int,
1475 beta: c_float,
1476 c: *mut c_float_complex,
1477 ldc: c_int,
1478 );
1479 pub fn cblas_cher2k(
1480 layout: CBLAS_LAYOUT,
1481 uplo: CBLAS_UPLO,
1482 trans: CBLAS_TRANSPOSE,
1483 n: c_int,
1484 k: c_int,
1485 alpha: *const c_float_complex,
1486 a: *const c_float_complex,
1487 lda: c_int,
1488 b: *const c_float_complex,
1489 ldb: c_int,
1490 beta: c_float,
1491 c: *mut c_float_complex,
1492 ldc: c_int,
1493 );
1494
1495 pub fn cblas_zhemm(
1496 layout: CBLAS_LAYOUT,
1497 side: CBLAS_SIDE,
1498 uplo: CBLAS_UPLO,
1499 m: c_int,
1500 n: c_int,
1501 alpha: *const c_double_complex,
1502 a: *const c_double_complex,
1503 lda: c_int,
1504 b: *const c_double_complex,
1505 ldb: c_int,
1506 beta: *const c_double_complex,
1507 c: *mut c_double_complex,
1508 ldc: c_int,
1509 );
1510 pub fn cblas_zherk(
1511 layout: CBLAS_LAYOUT,
1512 uplo: CBLAS_UPLO,
1513 trans: CBLAS_TRANSPOSE,
1514 n: c_int,
1515 k: c_int,
1516 alpha: c_double,
1517 a: *const c_double_complex,
1518 lda: c_int,
1519 beta: c_double,
1520 c: *mut c_double_complex,
1521 ldc: c_int,
1522 );
1523 pub fn cblas_zher2k(
1524 layout: CBLAS_LAYOUT,
1525 uplo: CBLAS_UPLO,
1526 trans: CBLAS_TRANSPOSE,
1527 n: c_int,
1528 k: c_int,
1529 alpha: *const c_double_complex,
1530 a: *const c_double_complex,
1531 lda: c_int,
1532 b: *const c_double_complex,
1533 ldb: c_int,
1534 beta: c_double,
1535 c: *mut c_double_complex,
1536 ldc: c_int,
1537 );
1538}
1539
1540extern "C" {
1541 pub fn cblas_xerbla(p: c_int, rout: *const c_char, form: *const c_char, ...);
1542}