1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
//
// A rust binding for the GSL library by Guillaume Gomez (guillaume1.gomez@gmail.com)
//

pub mod level1 {
    use enums;

    /// This function computes the sum \alpha + x^T y for the vectors x and y, returning the result in result.
    pub fn sdsdot(alpha: f32, x: &::types::VectorF32, y: &::types::VectorF32, result: &mut f32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_sdsdot(alpha, ::ffi::FFI::unwrap(x),
            ::ffi::FFI::unwrap(y), result) }
    }

    /// This function computes the scalar product x^T y for the vectors x and y, returning the result in result.
    pub fn sdot(x: &::types::VectorF32, y: &::types::VectorF32, result: &mut f32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_sdot(::ffi::FFI::unwrap(x), ::ffi::FFI::unwrap(y),
            result) }
    }

    /// This function computes the scalar product x^T y for the vectors x and y, returning the result in result.
    pub fn dsdot(x: &::types::VectorF32, y: &::types::VectorF32, result: &mut f64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_dsdot(::ffi::FFI::unwrap(x), ::ffi::FFI::unwrap(y),
            result) }
    }

    /// This function computes the scalar product x^T y for the vectors x and y, returning the result in result.
    pub fn ddot(x: &::types::VectorF64, y: &::types::VectorF64, result: &mut f64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_ddot(::ffi::FFI::unwrap(x), ::ffi::FFI::unwrap(y), result) }
    }

    /// This function computes the complex scalar product x^T y for the vectors x and y, returning the result in dotu.
    pub fn cdotu(x: &::types::VectorComplexF32, y: &::types::VectorComplexF32, dotu: &mut ::types::ComplexF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_cdotu(::ffi::FFI::unwrap(x),
            ::ffi::FFI::unwrap(y), ::std::mem::transmute(dotu)) }
    }

    /// This function computes the complex scalar product x^T y for the vectors x and y, returning the result in dotu.
    pub fn zdotu(x: &::types::VectorComplexF64, y: &::types::VectorComplexF64, dotu: &mut ::types::ComplexF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_zdotu(::ffi::FFI::unwrap(x),
            ::ffi::FFI::unwrap(y), ::std::mem::transmute(dotu)) }
    }

    /// This function computes the complex conjugate scalar product x^H y for the vectors x and y, returning the result in dotc.
    pub fn cdotc(x: &::types::VectorComplexF32, y: &::types::VectorComplexF32, dotc: &mut ::types::ComplexF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_cdotc(::ffi::FFI::unwrap(x),
            ::ffi::FFI::unwrap(y), ::std::mem::transmute(dotc)) }
    }

    /// This function computes the complex conjugate scalar product x^H y for the vectors x and y, returning the result in dotc.
    pub fn zdotc(x: &::types::VectorComplexF64, y: &::types::VectorComplexF64, dotc: &mut ::types::ComplexF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_zdotc(::ffi::FFI::unwrap(x),
            ::ffi::FFI::unwrap(y), ::std::mem::transmute(dotc)) }
    }

    /// This function computes the Euclidean norm ||x||_2 = \sqrt {\sum x_i^2} of the vector x.
    pub fn snrm2(x: &::types::VectorF32) -> f32 {
        unsafe { ::ffi::gsl_blas_snrm2(::ffi::FFI::unwrap(x)) }
    }

    /// This function computes the Euclidean norm ||x||_2 = \sqrt {\sum x_i^2} of the vector x.
    pub fn dnrm2(x: &::types::VectorF64) -> f64 {
        unsafe { ::ffi::gsl_blas_dnrm2(::ffi::FFI::unwrap(x)) }
    }

    /// This function computes the Euclidean norm of the complex vector x,
    /// 
    /// ||x||_2 = \sqrt {\sum (\Re(x_i)^2 + \Im(x_i)^2)}.
    pub fn scnrm2(x: &::types::VectorComplexF32) -> f32 {
        unsafe { ::ffi::gsl_blas_scnrm2(::ffi::FFI::unwrap(x)) }
    }

    /// This function computes the Euclidean norm of the complex vector x,
    /// 
    /// ||x||_2 = \sqrt {\sum (\Re(x_i)^2 + \Im(x_i)^2)}.
    pub fn dznrm2(x: &::types::VectorComplexF64) -> f64 {
        unsafe { ::ffi::gsl_blas_dznrm2(::ffi::FFI::unwrap(x)) }
    }

    /// This function computes the absolute sum \sum |x_i| of the elements of the vector x.
    pub fn sasum(x: &::types::VectorF32) -> f32 {
        unsafe { ::ffi::gsl_blas_sasum(::ffi::FFI::unwrap(x)) }
    }

    /// This function computes the absolute sum \sum |x_i| of the elements of the vector x.
    pub fn dasum(x: &::types::VectorF64) -> f64 {
        unsafe { ::ffi::gsl_blas_dasum(::ffi::FFI::unwrap(x)) }
    }

    /// This function computes the sum of the magnitudes of the real and imaginary parts of the complex vector x, \sum |\Re(x_i)| + |\Im(x_i)|.
    pub fn scasum(x: &::types::VectorComplexF32) -> f32 {
        unsafe { ::ffi::gsl_blas_scasum(::ffi::FFI::unwrap(x)) }
    }

    /// This function computes the sum of the magnitudes of the real and imaginary parts of the complex vector x, \sum |\Re(x_i)| + |\Im(x_i)|.
    pub fn dzasum(x: &::types::VectorComplexF64) -> f64 {
        unsafe { ::ffi::gsl_blas_dzasum(::ffi::FFI::unwrap(x)) }
    }

    /// This function returns the index of the largest element of the vector x.
    /// The largest element is determined by its absolute magnitude for real vectors and by the sum of the magnitudes of the real and imaginary parts |\Re(x_i)| + |\Im(x_i)| for complex vectors.
    /// If the largest value occurs several times then the index of the first occurrence is returned.
    pub fn isamax(x: &::types::VectorF32) -> u32 {
        unsafe { ::ffi::gsl_blas_isamax(::ffi::FFI::unwrap(x)) }
    }

    /// This function returns the index of the largest element of the vector x.
    /// The largest element is determined by its absolute magnitude for real vectors and by the sum of the magnitudes of the real and imaginary parts |\Re(x_i)| + |\Im(x_i)| for complex vectors.
    /// If the largest value occurs several times then the index of the first occurrence is returned.
    pub fn idamax(x: &::types::VectorF64) -> u32 {
        unsafe { ::ffi::gsl_blas_idamax(::ffi::FFI::unwrap(x)) }
    }

    /// This function returns the index of the largest element of the vector x.
    /// The largest element is determined by its absolute magnitude for real vectors and by the sum of the magnitudes of the real and imaginary parts |\Re(x_i)| + |\Im(x_i)| for complex vectors.
    /// If the largest value occurs several times then the index of the first occurrence is returned.
    pub fn icamax(x: &::types::VectorComplexF32) -> u32 {
        unsafe { ::ffi::gsl_blas_icamax(::ffi::FFI::unwrap(x)) }
    }

    /// This function returns the index of the largest element of the vector x.
    /// The largest element is determined by its absolute magnitude for real vectors and by the sum of the magnitudes of the real and imaginary parts |\Re(x_i)| + |\Im(x_i)| for complex vectors.
    /// If the largest value occurs several times then the index of the first occurrence is returned.
    pub fn izamax(x: &::types::VectorComplexF64) -> u32 {
        unsafe { ::ffi::gsl_blas_izamax(::ffi::FFI::unwrap(x)) }
    }

    /// This function exchanges the elements of the vectors x and y.
    pub fn sswap(x: &mut ::types::VectorF32, y: &mut ::types::VectorF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_sswap(::ffi::FFI::unwrap(x), ::ffi::FFI::unwrap(y)) }
    }

    /// This function exchanges the elements of the vectors x and y.
    pub fn dswap(x: &mut ::types::VectorF64, y: &mut ::types::VectorF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_dswap(::ffi::FFI::unwrap(x), ::ffi::FFI::unwrap(y)) }
    }

    /// This function exchanges the elements of the vectors x and y.
    pub fn cswap(x: &mut ::types::VectorComplexF32, y: &mut ::types::VectorComplexF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_cswap(::ffi::FFI::unwrap(x), ::ffi::FFI::unwrap(y)) }
    }

    /// This function exchanges the elements of the vectors x and y.
    pub fn zswap(x: &mut ::types::VectorComplexF64, y: &mut ::types::VectorComplexF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_zswap(::ffi::FFI::unwrap(x), ::ffi::FFI::unwrap(y)) }
    }

    /// This function copy the elements of the vector x into the vector y.
    pub fn scopy(x: &mut ::types::VectorF32, y: &mut ::types::VectorF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_scopy(::ffi::FFI::unwrap(x), ::ffi::FFI::unwrap(y)) }
    }

    /// This function copy the elements of the vector x into the vector y.
    pub fn dcopy(x: &mut ::types::VectorF64, y: &mut ::types::VectorF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_dcopy(::ffi::FFI::unwrap(x), ::ffi::FFI::unwrap(y)) }
    }

    /// This function copy the elements of the vector x into the vector y.
    pub fn ccopy(x: &mut ::types::VectorComplexF32, y: &mut ::types::VectorComplexF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_ccopy(::ffi::FFI::unwrap(x), ::ffi::FFI::unwrap(y)) }
    }

    /// This function copy the elements of the vector x into the vector y.
    pub fn zcopy(x: &mut ::types::VectorComplexF64, y: &mut ::types::VectorComplexF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_zcopy(::ffi::FFI::unwrap(x), ::ffi::FFI::unwrap(y)) }
    }

    /// This function computes the sum y = \alpha x + y for the vectors x and y.
    pub fn saxpy(alpha: f32, x: &::types::VectorF32, y: &mut ::types::VectorF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_saxpy(alpha, ::ffi::FFI::unwrap(x), ::ffi::FFI::unwrap(y)) }
    }

    /// This function computes the sum y = \alpha x + y for the vectors x and y.
    pub fn daxpy(alpha: f64, x: &::types::VectorF64, y: &mut ::types::VectorF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_daxpy(alpha, ::ffi::FFI::unwrap(x), ::ffi::FFI::unwrap(y)) }
    }

    /// This function computes the sum y = \alpha x + y for the vectors x and y.
    pub fn caxpy(alpha: &::types::ComplexF32, x: &::types::VectorComplexF32, y: &mut ::types::VectorComplexF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_caxpy(::std::mem::transmute(*alpha), ::ffi::FFI::unwrap(x), ::ffi::FFI::unwrap(y)) }
    }

    /// This function computes the sum y = \alpha x + y for the vectors x and y.
    pub fn zaxpy(alpha: &::types::ComplexF64, x: &::types::VectorComplexF64, y: &mut ::types::VectorComplexF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_zaxpy(::std::mem::transmute(*alpha), ::ffi::FFI::unwrap(x), ::ffi::FFI::unwrap(y)) }
    }

    /// This function rescales the vector x by the multiplicative factor alpha.
    pub fn sscal(alpha: f32, x: &mut ::types::VectorF32) {
        unsafe { ::ffi::gsl_blas_sscal(alpha, ::ffi::FFI::unwrap(x)) }
    }

    /// This function rescales the vector x by the multiplicative factor alpha.
    pub fn dscal(alpha: f64, x: &mut ::types::VectorF64) {
        unsafe { ::ffi::gsl_blas_dscal(alpha, ::ffi::FFI::unwrap(x)) }
    }

    /// This function rescales the vector x by the multiplicative factor alpha.
    pub fn cscal(alpha: &::types::ComplexF32, x: &mut ::types::VectorComplexF32) {
        unsafe { ::ffi::gsl_blas_cscal(::std::mem::transmute(*alpha), ::ffi::FFI::unwrap(x)) }
    }

    /// This function rescales the vector x by the multiplicative factor alpha.
    pub fn zscal(alpha: &::types::ComplexF64, x: &mut ::types::VectorComplexF64) {
        unsafe { ::ffi::gsl_blas_zscal(::std::mem::transmute(*alpha), ::ffi::FFI::unwrap(x)) }
    }

    /// This function rescales the vector x by the multiplicative factor alpha.
    pub fn csscal(alpha: f32, x: &mut ::types::VectorComplexF32) {
        unsafe { ::ffi::gsl_blas_csscal(alpha, ::ffi::FFI::unwrap(x)) }
    }

    /// This function rescales the vector x by the multiplicative factor alpha.
    pub fn zdscal(alpha: f64, x: &mut ::types::VectorComplexF64) {
        unsafe { ::ffi::gsl_blas_zdscal(alpha, ::ffi::FFI::unwrap(x)) }
    }

    /// This function computes a Givens rotation (c,s) which zeroes the vector (a,b),
    /// 
    /// [  c  s ] [ a ] = [ r ]
    /// 
    /// [ -s  c ] [ b ]   [ 0 ]
    /// 
    /// The variables a and b are overwritten by the routine.
    pub fn srotg(a: &mut [f32], b: &mut [f32], c: &mut [f32], d: &mut [f32]) -> enums::Value {
        unsafe { ::ffi::gsl_blas_srotg(a.as_mut_ptr(), b.as_mut_ptr(), c.as_mut_ptr(), d.as_mut_ptr()) }
    }

    /// This function computes a Givens rotation (c,s) which zeroes the vector (a,b),
    /// 
    /// [  c  s ] [ a ] = [ r ]
    /// 
    /// [ -s  c ] [ b ]   [ 0 ]
    /// 
    /// The variables a and b are overwritten by the routine.
    pub fn drotg(a: &mut [f64], b: &mut [f64], c: &mut [f64], d: &mut [f64]) -> enums::Value {
        unsafe { ::ffi::gsl_blas_drotg(a.as_mut_ptr(), b.as_mut_ptr(), c.as_mut_ptr(), d.as_mut_ptr()) }
    }

    /// This function applies a Givens rotation (x', y') = (c x + s y, -s x + c y) to the vectors x, y.
    pub fn srot(a: &mut ::types::VectorF32, b: &mut ::types::VectorF32, c: f32, d: f32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_srot(::ffi::FFI::unwrap(a), ::ffi::FFI::unwrap(b), c, d) }
    }

    /// This function applies a Givens rotation (x', y') = (c x + s y, -s x + c y) to the vectors x, y.
    pub fn drot(a: &mut ::types::VectorF64, b: &mut ::types::VectorF64, c: f64, d: f64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_drot(::ffi::FFI::unwrap(a), ::ffi::FFI::unwrap(b), c, d) }
    }

    /// This function computes a modified Givens transformation.
    /// The modified Givens transformation is defined in the original Level-1 BLAS specification, given in the references.
    pub fn srotmg(d1: &mut [f32], d2: &mut [f32], b1: &mut [f32], b2: f32, P: &mut [f32]) -> enums::Value {
        unsafe { ::ffi::gsl_blas_srotmg(d1.as_mut_ptr(), d2.as_mut_ptr(), b1.as_mut_ptr(), b2, P.as_mut_ptr()) }
    }

    /// This function computes a modified Givens transformation.
    /// The modified Givens transformation is defined in the original Level-1 BLAS specification, given in the references.
    pub fn drotmg(d1: &mut [f64], d2: &mut [f64], b1: &mut [f64], b2: f64, P: &mut [f64]) -> enums::Value {
        unsafe { ::ffi::gsl_blas_drotmg(d1.as_mut_ptr(), d2.as_mut_ptr(), b1.as_mut_ptr(), b2, P.as_mut_ptr()) }
    }

    /// This function applies a modified Givens transformation.
    pub fn srotm(x: &mut ::types::VectorF32, y: &mut ::types::VectorF32, P: &mut [f32]) -> enums::Value {
        unsafe { ::ffi::gsl_blas_srotm(::ffi::FFI::unwrap(x), ::ffi::FFI::unwrap(y), P.as_mut_ptr()) }
    }

    /// This function applies a modified Givens transformation.
    pub fn drotm(x: &mut ::types::VectorF64, y: &mut ::types::VectorF64, P: &mut [f64]) -> enums::Value {
        unsafe { ::ffi::gsl_blas_drotm(::ffi::FFI::unwrap(x), ::ffi::FFI::unwrap(y), P.as_mut_ptr()) }
    }
}

pub mod level2 {
    use enums;

    /// This function computes the matrix-vector product and sum y = \alpha op(A) x + \beta y, where op(A) = A, A^T, A^H for TransA = CblasNoTrans, CblasTrans, CblasConjTrans.
    pub fn sgemv(transA: ::cblas::Transpose, alpha: f32, A: &::types::MatrixF32, x: &::types::VectorF32, beta: f32, y: &mut ::types::VectorF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_sgemv(transA, alpha, ::ffi::FFI::unwrap(A), ::ffi::FFI::unwrap(x),
            beta, ::ffi::FFI::unwrap(y)) }
    }

    /// This function computes the matrix-vector product and sum y = \alpha op(A) x + \beta y, where op(A) = A, A^T, A^H for TransA = CblasNoTrans, CblasTrans, CblasConjTrans.
    pub fn dgemv(transA: ::cblas::Transpose, alpha: f64, A: &::types::MatrixF64, x: &::types::VectorF64, beta: f64, y: &mut ::types::VectorF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_dgemv(transA, alpha, ::ffi::FFI::unwrap(A), ::ffi::FFI::unwrap(x),
            beta, ::ffi::FFI::unwrap(y)) }
    }

    /// This function computes the matrix-vector product and sum y = \alpha op(A) x + \beta y, where op(A) = A, A^T, A^H for TransA = CblasNoTrans, CblasTrans, CblasConjTrans.
    pub fn cgemv(transA: ::cblas::Transpose, alpha: &::types::ComplexF32, A: &::types::MatrixComplexF32, x: &::types::VectorComplexF32,
        beta: &::types::ComplexF32, y: &mut ::types::VectorComplexF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_cgemv(transA, ::std::mem::transmute(*alpha), ::ffi::FFI::unwrap(A),
            ::ffi::FFI::unwrap(x), ::std::mem::transmute(*beta), ::ffi::FFI::unwrap(y)) }
    }

    /// This function computes the matrix-vector product and sum y = \alpha op(A) x + \beta y, where op(A) = A, A^T, A^H for TransA = CblasNoTrans, CblasTrans, CblasConjTrans.
    pub fn zgemv(transA: ::cblas::Transpose, alpha: &::types::ComplexF64, A: &::types::MatrixComplexF64, x: &::types::VectorComplexF64, beta: &::types::ComplexF64,
        y: &mut ::types::VectorComplexF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_zgemv(transA, ::std::mem::transmute(*alpha), ::ffi::FFI::unwrap(A),
            ::ffi::FFI::unwrap(x), ::std::mem::transmute(*beta), ::ffi::FFI::unwrap(y)) }
    }

    /// This function computes the matrix-vector product x = op(A) x for the triangular matrix A, where op(A) = A, A^T, A^H for TransA = CblasNoTrans, CblasTrans, CblasConjTrans.
    /// When Uplo is CblasUpper then the upper triangle of A is used, and when Uplo is CblasLower then the lower triangle of A is used.
    /// If Diag is CblasNonUnit then the diagonal of the matrix is used, but if Diag is CblasUnit then the diagonal elements of the matrix A are taken as unity and are not referenced.
    pub fn strmv(uplo: ::cblas::Uplo, transA: ::cblas::Transpose, diag: ::cblas::Diag, A: &::types::MatrixF32,
        x: &mut ::types::VectorF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_strmv(uplo, transA, diag, ::ffi::FFI::unwrap(A), ::ffi::FFI::unwrap(x)) }
    }

    /// This function computes the matrix-vector product x = op(A) x for the triangular matrix A, where op(A) = A, A^T, A^H for TransA = CblasNoTrans, CblasTrans, CblasConjTrans.
    /// When Uplo is CblasUpper then the upper triangle of A is used, and when Uplo is CblasLower then the lower triangle of A is used.
    /// If Diag is CblasNonUnit then the diagonal of the matrix is used, but if Diag is CblasUnit then the diagonal elements of the matrix A are taken as unity and are not referenced.
    pub fn dtrmv(uplo: ::cblas::Uplo, transA: ::cblas::Transpose, diag: ::cblas::Diag, A: &::types::MatrixF64,
        x: &mut ::types::VectorF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_dtrmv(uplo, transA, diag, ::ffi::FFI::unwrap(A), ::ffi::FFI::unwrap(x)) }
    }

    /// This function computes the matrix-vector product x = op(A) x for the triangular matrix A, where op(A) = A, A^T, A^H for TransA = CblasNoTrans, CblasTrans, CblasConjTrans.
    /// When Uplo is CblasUpper then the upper triangle of A is used, and when Uplo is CblasLower then the lower triangle of A is used.
    /// If Diag is CblasNonUnit then the diagonal of the matrix is used, but if Diag is CblasUnit then the diagonal elements of the matrix A are taken as unity and are not referenced.
    pub fn ctrmv(uplo: ::cblas::Uplo, transA: ::cblas::Transpose, diag: ::cblas::Diag, A: &::types::MatrixComplexF32,
        x: &mut ::types::VectorComplexF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_ctrmv(uplo, transA, diag, ::ffi::FFI::unwrap(A), ::ffi::FFI::unwrap(x)) }
    }

    /// This function computes the matrix-vector product x = op(A) x for the triangular matrix A, where op(A) = A, A^T, A^H for TransA = CblasNoTrans, CblasTrans, CblasConjTrans.
    /// When Uplo is CblasUpper then the upper triangle of A is used, and when Uplo is CblasLower then the lower triangle of A is used.
    /// If Diag is CblasNonUnit then the diagonal of the matrix is used, but if Diag is CblasUnit then the diagonal elements of the matrix A are taken as unity and are not referenced.
    pub fn ztrmv(uplo: ::cblas::Uplo, transA: ::cblas::Transpose, diag: ::cblas::Diag, A: &::types::MatrixComplexF64,
        x: &mut ::types::VectorComplexF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_ztrmv(uplo, transA, diag, ::ffi::FFI::unwrap(A), ::ffi::FFI::unwrap(x)) }
    }

    /// This function computes inv(op(A)) x for x, where op(A) = A, A^T, A^H for TransA = CblasNoTrans, CblasTrans, CblasConjTrans.
    /// When Uplo is CblasUpper then the upper triangle of A is used, and when Uplo is CblasLower then the lower triangle of A is used.
    /// If Diag is CblasNonUnit then the diagonal of the matrix is used, but if Diag is CblasUnit then the diagonal elements of the matrix A are taken as unity and are not referenced.
    pub fn strsv(uplo: ::cblas::Uplo, transA: ::cblas::Transpose, diag: ::cblas::Diag, A: &::types::MatrixF32,
        x: &mut ::types::VectorF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_strsv(uplo, transA, diag, ::ffi::FFI::unwrap(A), ::ffi::FFI::unwrap(x)) }
    }

    /// This function computes inv(op(A)) x for x, where op(A) = A, A^T, A^H for TransA = CblasNoTrans, CblasTrans, CblasConjTrans.
    /// When Uplo is CblasUpper then the upper triangle of A is used, and when Uplo is CblasLower then the lower triangle of A is used.
    /// If Diag is CblasNonUnit then the diagonal of the matrix is used, but if Diag is CblasUnit then the diagonal elements of the matrix A are taken as unity and are not referenced.
    pub fn dtrsv(uplo: ::cblas::Uplo, transA: ::cblas::Transpose, diag: ::cblas::Diag, A: &::types::MatrixF64,
        x: &mut ::types::VectorF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_dtrsv(uplo, transA, diag, ::ffi::FFI::unwrap(A), ::ffi::FFI::unwrap(x)) }
    }

    /// This function computes inv(op(A)) x for x, where op(A) = A, A^T, A^H for TransA = CblasNoTrans, CblasTrans, CblasConjTrans.
    /// When Uplo is CblasUpper then the upper triangle of A is used, and when Uplo is CblasLower then the lower triangle of A is used.
    /// If Diag is CblasNonUnit then the diagonal of the matrix is used, but if Diag is CblasUnit then the diagonal elements of the matrix A are taken as unity and are not referenced.
    pub fn ctrsv(uplo: ::cblas::Uplo, transA: ::cblas::Transpose, diag: ::cblas::Diag, A: &::types::MatrixComplexF32,
        x: &mut ::types::VectorComplexF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_ctrsv(uplo, transA, diag, ::ffi::FFI::unwrap(A), ::ffi::FFI::unwrap(x)) }
    }

    /// This function computes inv(op(A)) x for x, where op(A) = A, A^T, A^H for TransA = CblasNoTrans, CblasTrans, CblasConjTrans.
    /// When Uplo is CblasUpper then the upper triangle of A is used, and when Uplo is CblasLower then the lower triangle of A is used.
    /// If Diag is CblasNonUnit then the diagonal of the matrix is used, but if Diag is CblasUnit then the diagonal elements of the matrix A are taken as unity and are not referenced.
    pub fn ztrsv(uplo: ::cblas::Uplo, transA: ::cblas::Transpose, diag: ::cblas::Diag, A: &::types::MatrixComplexF64,
        x: &mut ::types::VectorComplexF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_ztrsv(uplo, transA, diag, ::ffi::FFI::unwrap(A), ::ffi::FFI::unwrap(x)) }
    }

    /// These functions compute the matrix-vector product and sum y = \alpha A x + \beta y for the symmetric matrix A.
    /// Since the matrix A is symmetric only its upper half or lower half need to be stored.
    /// When Uplo is CblasUpper then the upper triangle and diagonal of A are used, and when Uplo is CblasLower then the lower triangle and diagonal of A are used.
    pub fn ssymv(uplo: ::cblas::Uplo, alpha: f32, A: &::types::MatrixF32, x: &::types::VectorF32, beta: f32, y: &mut ::types::VectorF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_ssymv(uplo, alpha, ::ffi::FFI::unwrap(A),
            ::ffi::FFI::unwrap(x), beta, ::ffi::FFI::unwrap(y)) }
    }

    /// These functions compute the matrix-vector product and sum y = \alpha A x + \beta y for the symmetric matrix A.
    /// Since the matrix A is symmetric only its upper half or lower half need to be stored.
    /// When Uplo is CblasUpper then the upper triangle and diagonal of A are used, and when Uplo is CblasLower then the lower triangle and diagonal of A are used.
    pub fn dsymv(uplo: ::cblas::Uplo, alpha: f64, A: &::types::MatrixF64, x: &::types::VectorF64, beta: f64, y: &mut ::types::VectorF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_dsymv(uplo, alpha, ::ffi::FFI::unwrap(A), ::ffi::FFI::unwrap(x),
            beta, ::ffi::FFI::unwrap(y)) }
    }

    /// These functions compute the matrix-vector product and sum y = \alpha A x + \beta y for the hermitian matrix A.
    /// Since the matrix A is hermitian only its upper half or lower half need to be stored. When Uplo is CblasUpper then the upper triangle and diagonal of A are used, and when Uplo is CblasLower then the lower triangle and diagonal of A are used.
    /// The imaginary elements of the diagonal are automatically assumed to be zero and are not referenced.
    pub fn chemv(uplo: ::cblas::Uplo, alpha: &::types::ComplexF32, A: &::types::MatrixComplexF32, x: &::types::VectorComplexF32,
        beta: &::types::ComplexF32, y: &mut ::types::VectorComplexF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_chemv(uplo, ::std::mem::transmute(*alpha), ::ffi::FFI::unwrap(A),
            ::ffi::FFI::unwrap(x), ::std::mem::transmute(*beta), ::ffi::FFI::unwrap(y)) }
    }

    /// These functions compute the matrix-vector product and sum y = \alpha A x + \beta y for the hermitian matrix A.
    /// Since the matrix A is hermitian only its upper half or lower half need to be stored. When Uplo is CblasUpper then the upper triangle and diagonal of A are used, and when Uplo is CblasLower then the lower triangle and diagonal of A are used.
    /// The imaginary elements of the diagonal are automatically assumed to be zero and are not referenced.
    pub fn zhemv(uplo: ::cblas::Uplo, alpha: &::types::ComplexF64, A: &::types::MatrixComplexF64, x: &::types::VectorComplexF64, beta: &::types::ComplexF64,
        y: &mut ::types::VectorComplexF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_zhemv(uplo, ::std::mem::transmute(*alpha), ::ffi::FFI::unwrap(A),
            ::ffi::FFI::unwrap(x), ::std::mem::transmute(*beta), ::ffi::FFI::unwrap(y)) }
    }

    /// This function computes the rank-1 update A = \alpha x y^T + A of the matrix A.
    pub fn sger(alpha: f32, x: &::types::VectorF32, y: &::types::VectorF32, A: &mut ::types::MatrixF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_sger(alpha, ::ffi::FFI::unwrap(x),
            ::ffi::FFI::unwrap(y), ::ffi::FFI::unwrap(A)) }
    }

    /// This function computes the rank-1 update A = \alpha x y^T + A of the matrix A.
    pub fn dger(alpha: f64, x: &::types::VectorF64, y: &::types::VectorF64, A: &mut ::types::MatrixF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_dger(alpha, ::ffi::FFI::unwrap(x), ::ffi::FFI::unwrap(y),
            ::ffi::FFI::unwrap(A)) }
    }

    /// This function computes the rank-1 update A = \alpha x y^T + A of the matrix A.
    pub fn cgeru(alpha: &::types::ComplexF32, x: &::types::VectorComplexF32, y: &::types::VectorComplexF32, A: &mut ::types::MatrixComplexF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_cgeru(::std::mem::transmute(*alpha), ::ffi::FFI::unwrap(x),
            ::ffi::FFI::unwrap(y), ::ffi::FFI::unwrap(A)) }
    }

    /// This function computes the rank-1 update A = \alpha x y^T + A of the matrix A.
    pub fn zgeru(alpha: &::types::ComplexF64, x: &::types::VectorComplexF64, y: &::types::VectorComplexF64, A: &mut ::types::MatrixComplexF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_zgeru(::std::mem::transmute(*alpha), ::ffi::FFI::unwrap(x),
            ::ffi::FFI::unwrap(y), ::ffi::FFI::unwrap(A)) }
    }

    /// This function computes the conjugate rank-1 update A = \alpha x y^H + A of the matrix A.
    pub fn cgerc(alpha: &::types::ComplexF32, x: &::types::VectorComplexF32, y: &::types::VectorComplexF32, A: &mut ::types::MatrixComplexF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_cgerc(::std::mem::transmute(*alpha), ::ffi::FFI::unwrap(x),
            ::ffi::FFI::unwrap(y), ::ffi::FFI::unwrap(A)) }
    }

    /// This function computes the conjugate rank-1 update A = \alpha x y^H + A of the matrix A.
    pub fn zgerc(alpha: &::types::ComplexF64, x: &::types::VectorComplexF64, y: &::types::VectorComplexF64, A: &mut ::types::MatrixComplexF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_zgerc(::std::mem::transmute(*alpha), ::ffi::FFI::unwrap(x),
            ::ffi::FFI::unwrap(y), ::ffi::FFI::unwrap(A)) }
    }

    /// This function computes the symmetric rank-1 update A = \alpha x x^T + A of the symmetric matrix A. Since the matrix A is symmetric only its upper half or lower half need to be stored.
    /// When Uplo is CblasUpper then the upper triangle and diagonal of A are used, and when Uplo is CblasLower then the lower triangle and diagonal of A are used.
    pub fn ssyr(uplo: ::cblas::Uplo, alpha: f32, x: &::types::VectorF32, A: &mut ::types::MatrixF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_ssyr(uplo, alpha, ::ffi::FFI::unwrap(x), ::ffi::FFI::unwrap(A)) }
    }

    /// This function computes the symmetric rank-1 update A = \alpha x x^T + A of the symmetric matrix A. Since the matrix A is symmetric only its upper half or lower half need to be stored.
    /// When Uplo is CblasUpper then the upper triangle and diagonal of A are used, and when Uplo is CblasLower then the lower triangle and diagonal of A are used.
    pub fn dsyr(uplo: ::cblas::Uplo, alpha: f64, x: &::types::VectorF64, A: &mut ::types::MatrixF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_dsyr(uplo, alpha, ::ffi::FFI::unwrap(x), ::ffi::FFI::unwrap(A)) }
    }

    /// These functions compute the hermitian rank-1 update A = \alpha x x^H + A of the hermitian matrix A.
    /// Since the matrix A is hermitian only its upper half or lower half need to be stored.
    /// When Uplo is CblasUpper then the upper triangle and diagonal of A are used, and when Uplo is CblasLower then the lower triangle and diagonal of A are used.
    /// The imaginary elements of the diagonal are automatically set to zero.
    pub fn cher(uplo: ::cblas::Uplo, alpha: f32, x: &::types::VectorComplexF32, A: &mut ::types::MatrixComplexF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_cher(uplo, alpha, ::ffi::FFI::unwrap(x), ::ffi::FFI::unwrap(A)) }
    }

    /// These functions compute the hermitian rank-1 update A = \alpha x x^H + A of the hermitian matrix A.
    /// Since the matrix A is hermitian only its upper half or lower half need to be stored.
    /// When Uplo is CblasUpper then the upper triangle and diagonal of A are used, and when Uplo is CblasLower then the lower triangle and diagonal of A are used.
    /// The imaginary elements of the diagonal are automatically set to zero.
    pub fn zher(uplo: ::cblas::Uplo, alpha: f64, x: &::types::VectorComplexF64, A: &mut ::types::MatrixComplexF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_zher(uplo, alpha, ::ffi::FFI::unwrap(x), ::ffi::FFI::unwrap(A)) }
    }

    /// These functions compute the symmetric rank-2 update A = \alpha x y^T + \alpha y x^T + A of the symmetric matrix A.
    /// Since the matrix A is symmetric only its upper half or lower half need to be stored.
    /// When Uplo is CblasUpper then the upper triangle and diagonal of A are used, and when Uplo is CblasLower then the lower triangle and diagonal of A are used.
    pub fn ssyr2(uplo: ::cblas::Uplo, alpha: f32, x: &::types::VectorF32, y: &::types::VectorF32, A: &mut ::types::MatrixF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_ssyr2(uplo, alpha, ::ffi::FFI::unwrap(x), ::ffi::FFI::unwrap(y),
            ::ffi::FFI::unwrap(A)) }
    }

    /// These functions compute the symmetric rank-2 update A = \alpha x y^T + \alpha y x^T + A of the symmetric matrix A.
    /// Since the matrix A is symmetric only its upper half or lower half need to be stored.
    /// When Uplo is CblasUpper then the upper triangle and diagonal of A are used, and when Uplo is CblasLower then the lower triangle and diagonal of A are used.
    pub fn dsyr2(uplo: ::cblas::Uplo, alpha: f64, x: &::types::VectorF64, y: &::types::VectorF64, A: &mut ::types::MatrixF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_dsyr2(uplo, alpha, ::ffi::FFI::unwrap(x), ::ffi::FFI::unwrap(y),
            ::ffi::FFI::unwrap(A)) }
    }

    /// These functions compute the hermitian rank-2 update A = \alpha x y^H + \alpha^* y x^H + A of the hermitian matrix A.
    /// Since the matrix A is hermitian only its upper half or lower half need to be stored.
    /// When Uplo is CblasUpper then the upper triangle and diagonal of A are used, and when Uplo is CblasLower then the lower triangle and diagonal of A are used.
    /// The imaginary elements of the diagonal are automatically set to zero.
    pub fn cher2(uplo: ::cblas::Uplo, alpha: &::types::ComplexF32, x: &::types::VectorComplexF32, y: &::types::VectorComplexF32,
        A: &mut ::types::MatrixComplexF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_cher2(uplo, ::std::mem::transmute(*alpha), ::ffi::FFI::unwrap(x),
            ::ffi::FFI::unwrap(y), ::ffi::FFI::unwrap(A)) }
    }

    /// These functions compute the hermitian rank-2 update A = \alpha x y^H + \alpha^* y x^H + A of the hermitian matrix A.
    /// Since the matrix A is hermitian only its upper half or lower half need to be stored.
    /// When Uplo is CblasUpper then the upper triangle and diagonal of A are used, and when Uplo is CblasLower then the lower triangle and diagonal of A are used.
    /// The imaginary elements of the diagonal are automatically set to zero.
    pub fn zher2(uplo: ::cblas::Uplo, alpha: &::types::ComplexF64, x: &::types::VectorComplexF64, y: &::types::VectorComplexF64,
        A: &mut ::types::MatrixComplexF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_zher2(uplo, ::std::mem::transmute(*alpha), ::ffi::FFI::unwrap(x),
            ::ffi::FFI::unwrap(y), ::ffi::FFI::unwrap(A)) }
    }
}

pub mod level3 {
    use enums;

    /// This function computes the matrix-matrix product and sum C = \alpha op(A) op(B) + \beta C where op(A) = A, A^T, A^H for TransA = CblasNoTrans, CblasTrans, CblasConjTrans and similarly for the parameter TransB.
    pub fn sgemm(transA: ::cblas::Transpose, transB: ::cblas::Transpose, alpha: f32, A: &::types::MatrixF32,
        B: &::types::MatrixF32, beta: f32, C: &mut ::types::MatrixF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_sgemm(transA, transB, alpha, ::ffi::FFI::unwrap(A),
            ::ffi::FFI::unwrap(B), beta, ::ffi::FFI::unwrap(C)) }
    }

    /// This function computes the matrix-matrix product and sum C = \alpha op(A) op(B) + \beta C where op(A) = A, A^T, A^H for TransA = CblasNoTrans, CblasTrans, CblasConjTrans and similarly for the parameter TransB.
    pub fn dgemm(transA: ::cblas::Transpose, transB: ::cblas::Transpose, alpha: f64, A: &::types::MatrixF64, B: &::types::MatrixF64,
        beta: f64, C: &mut ::types::MatrixF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_dgemm(transA, transB, alpha, ::ffi::FFI::unwrap(A),
            ::ffi::FFI::unwrap(B), beta, ::ffi::FFI::unwrap(C)) }
    }

    /// This function computes the matrix-matrix product and sum C = \alpha op(A) op(B) + \beta C where op(A) = A, A^T, A^H for TransA = CblasNoTrans, CblasTrans, CblasConjTrans and similarly for the parameter TransB.
    pub fn cgemm(transA: ::cblas::Transpose, transB: ::cblas::Transpose, alpha: &::types::ComplexF32, A: &::types::MatrixComplexF32,
        B: &::types::MatrixComplexF32, beta: &::types::ComplexF32, C: &mut ::types::MatrixComplexF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_cgemm(transA, transB, ::std::mem::transmute(*alpha), ::ffi::FFI::unwrap(A),
            ::ffi::FFI::unwrap(B), ::std::mem::transmute(*beta), ::ffi::FFI::unwrap(C)) }
    }

    /// This function computes the matrix-matrix product and sum C = \alpha op(A) op(B) + \beta C where op(A) = A, A^T, A^H for TransA = CblasNoTrans, CblasTrans, CblasConjTrans and similarly for the parameter TransB.
    pub fn zgemm(transA: ::cblas::Transpose, transB: ::cblas::Transpose, alpha: &::types::ComplexF64, A: &::types::MatrixComplexF64,
        B: &::types::MatrixComplexF64, beta: &::types::ComplexF64, C: &mut ::types::MatrixComplexF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_zgemm(transA, transB, ::std::mem::transmute(*alpha), ::ffi::FFI::unwrap(A),
            ::ffi::FFI::unwrap(B), ::std::mem::transmute(*beta), ::ffi::FFI::unwrap(C)) }
    }

    /// This function computes the matrix-matrix product and sum C = \alpha A B + \beta C for Side is CblasLeft and C = \alpha B A + \beta C for Side is CblasRight, where the matrix A is symmetric.
    /// When Uplo is CblasUpper then the upper triangle and diagonal of A are used, and when Uplo is CblasLower then the lower triangle and diagonal of A are used.
    pub fn ssymm(side: ::cblas::Side, uplo: ::cblas::Uplo, alpha: f32, A: &::types::MatrixF32, B: &::types::MatrixF32, beta: f32,
        C: &mut ::types::MatrixF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_ssymm(side, uplo, alpha, ::ffi::FFI::unwrap(A), ::ffi::FFI::unwrap(B),
            beta, ::ffi::FFI::unwrap(C)) }
    }

    /// This function computes the matrix-matrix product and sum C = \alpha A B + \beta C for Side is CblasLeft and C = \alpha B A + \beta C for Side is CblasRight, where the matrix A is symmetric.
    /// When Uplo is CblasUpper then the upper triangle and diagonal of A are used, and when Uplo is CblasLower then the lower triangle and diagonal of A are used.
    pub fn dsymm(side: ::cblas::Side, uplo: ::cblas::Uplo, alpha: f64, A: &::types::MatrixF64, B: &::types::MatrixF64, beta: f64,
        C: &mut ::types::MatrixF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_dsymm(side, uplo, alpha, ::ffi::FFI::unwrap(A), ::ffi::FFI::unwrap(B),
            beta, ::ffi::FFI::unwrap(C)) }
    }

    /// This function computes the matrix-matrix product and sum C = \alpha A B + \beta C for Side is CblasLeft and C = \alpha B A + \beta C for Side is CblasRight, where the matrix A is symmetric.
    /// When Uplo is CblasUpper then the upper triangle and diagonal of A are used, and when Uplo is CblasLower then the lower triangle and diagonal of A are used.
    pub fn csymm(side: ::cblas::Side, uplo: ::cblas::Uplo, alpha: &::types::ComplexF32, A: &::types::MatrixComplexF32, B: &::types::MatrixComplexF32,
        beta: &::types::ComplexF32, C: &mut ::types::MatrixComplexF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_csymm(side, uplo, ::std::mem::transmute(*alpha), ::ffi::FFI::unwrap(A),
            ::ffi::FFI::unwrap(B), ::std::mem::transmute(*beta), ::ffi::FFI::unwrap(C)) }
    }

    /// This function computes the matrix-matrix product and sum C = \alpha A B + \beta C for Side is CblasLeft and C = \alpha B A + \beta C for Side is CblasRight, where the matrix A is symmetric.
    /// When Uplo is CblasUpper then the upper triangle and diagonal of A are used, and when Uplo is CblasLower then the lower triangle and diagonal of A are used.
    pub fn zsymm(side: ::cblas::Side, uplo: ::cblas::Uplo, alpha: &::types::ComplexF64, A: &::types::MatrixComplexF64, B: &::types::MatrixComplexF64,
        beta: &::types::ComplexF64, C: &mut ::types::MatrixComplexF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_zsymm(side, uplo, ::std::mem::transmute(*alpha), ::ffi::FFI::unwrap(A),
            ::ffi::FFI::unwrap(B), ::std::mem::transmute(*beta), ::ffi::FFI::unwrap(C)) }
    }

    /// This function computes the matrix-matrix product and sum C = \alpha A B + \beta C for Side is Left and C = \alpha B A + \beta C for Side is Right, where the matrix A is hermitian.
    /// When Uplo is Upper then the upper triangle and diagonal of A are used, and when Uplo is Lower then the lower triangle and diagonal of A are used.
    /// The imaginary elements of the diagonal are automatically set to zero.
    pub fn chemm(side: ::cblas::Side, uplo: ::cblas::Uplo, alpha: &::types::ComplexF32, A: &::types::MatrixComplexF32, B: &::types::MatrixComplexF32,
        beta: &::types::ComplexF32, C: &mut ::types::MatrixComplexF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_chemm(side, uplo, ::std::mem::transmute(*alpha), ::ffi::FFI::unwrap(A),
            ::ffi::FFI::unwrap(B), ::std::mem::transmute(*beta), ::ffi::FFI::unwrap(C)) }
    }

    /// This function computes the matrix-matrix product and sum C = \alpha A B + \beta C for Side is CblasLeft and C = \alpha B A + \beta C for Side is CblasRight, where the matrix A is hermitian.
    /// When Uplo is CblasUpper then the upper triangle and diagonal of A are used, and when Uplo is CblasLower then the lower triangle and diagonal of A are used.
    /// The imaginary elements of the diagonal are automatically set to zero.
    pub fn zhemm(side: ::cblas::Side, uplo: ::cblas::Uplo, alpha: &::types::ComplexF64, A: &::types::MatrixComplexF64, B: &::types::MatrixComplexF64,
        beta: &::types::ComplexF64, C: &mut ::types::MatrixComplexF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_zhemm(side, uplo, ::std::mem::transmute(*alpha), ::ffi::FFI::unwrap(A),
            ::ffi::FFI::unwrap(B), ::std::mem::transmute(*beta), ::ffi::FFI::unwrap(C)) }
    }

    /// This function computes the matrix-matrix product B = \alpha op(A) B for Side is Left and B = \alpha B op(A) for Side is CblasRight.
    /// The matrix A is triangular and op(A) = A, A^T, A^H for TransA = NoTrans, Trans, ConjTrans.
    /// When Uplo is Upper then the upper triangle of A is used, and when Uplo is Lower then the lower triangle of A is used.
    /// If Diag is NonUnit then the diagonal of A is used, but if Diag is Unit then the diagonal elements of the matrix A are taken as unity and are not referenced.
    pub fn strmm(side: ::cblas::Side, uplo: ::cblas::Uplo, transA: ::cblas::Transpose, diag: ::cblas::Diag,
        alpha: f32, A: &::types::MatrixF32, B: &mut ::types::MatrixF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_strmm(side, uplo, transA, diag, alpha, ::ffi::FFI::unwrap(A), ::ffi::FFI::unwrap(B)) }
    }

    /// This function computes the matrix-matrix product B = \alpha op(A) B for Side is Left and B = \alpha B op(A) for Side is CblasRight.
    /// The matrix A is triangular and op(A) = A, A^T, A^H for TransA = NoTrans, Trans, ConjTrans.
    /// When Uplo is Upper then the upper triangle of A is used, and when Uplo is Lower then the lower triangle of A is used.
    /// If Diag is NonUnit then the diagonal of A is used, but if Diag is Unit then the diagonal elements of the matrix A are taken as unity and are not referenced.
    pub fn dtrmm(side: ::cblas::Side, uplo: ::cblas::Uplo, transA: ::cblas::Transpose, diag: ::cblas::Diag,
        alpha: f64, A: &::types::MatrixF64, B: &mut ::types::MatrixF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_dtrmm(side, uplo, transA, diag, alpha, ::ffi::FFI::unwrap(A), ::ffi::FFI::unwrap(B)) }
    }
    
    /// This function computes the matrix-matrix product B = \alpha op(A) B for Side is Left and B = \alpha B op(A) for Side is CblasRight.
    /// The matrix A is triangular and op(A) = A, A^T, A^H for TransA = NoTrans, Trans, ConjTrans.
    /// When Uplo is Upper then the upper triangle of A is used, and when Uplo is Lower then the lower triangle of A is used.
    /// If Diag is NonUnit then the diagonal of A is used, but if Diag is Unit then the diagonal elements of the matrix A are taken as unity and are not referenced.
    pub fn ctrmm(side: ::cblas::Side, uplo: ::cblas::Uplo, transA: ::cblas::Transpose, diag: ::cblas::Diag,
        alpha: &::types::ComplexF32, A: &::types::MatrixComplexF32, B: &mut ::types::MatrixComplexF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_ctrmm(side, uplo, transA, diag, ::std::mem::transmute(*alpha),
            ::ffi::FFI::unwrap(A), ::ffi::FFI::unwrap(B)) }
    }
    
    /// This function computes the matrix-matrix product B = \alpha op(A) B for Side is Left and B = \alpha B op(A) for Side is CblasRight.
    /// The matrix A is triangular and op(A) = A, A^T, A^H for TransA = NoTrans, Trans, ConjTrans.
    /// When Uplo is Upper then the upper triangle of A is used, and when Uplo is Lower then the lower triangle of A is used.
    /// If Diag is NonUnit then the diagonal of A is used, but if Diag is Unit then the diagonal elements of the matrix A are taken as unity and are not referenced.
    pub fn ztrmm(side: ::cblas::Side, uplo: ::cblas::Uplo, transA: ::cblas::Transpose, diag: ::cblas::Diag,
        alpha: &::types::ComplexF64, A: &::types::MatrixComplexF64, B: &mut ::types::MatrixComplexF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_ztrmm(side, uplo, transA, diag, ::std::mem::transmute(*alpha),
            ::ffi::FFI::unwrap(A), ::ffi::FFI::unwrap(B)) }
    }

    /// This function computes the inverse-matrix matrix product B = \alpha op(inv(A))B for Side is Left and B = \alpha B op(inv(A)) for Side is Right.
    /// The matrix A is triangular and op(A) = A, A^T, A^H for TransA = NoTrans, Trans, ConjTrans.
    /// When Uplo is Upper then the upper triangle of A is used, and when Uplo is Lower then the lower triangle of A is used.
    /// If Diag is NonUnit then the diagonal of A is used, but if Diag is Unit then the diagonal elements of the matrix A are taken as unity and are not referenced.
    pub fn strsm(side: ::cblas::Side, uplo: ::cblas::Uplo, transA: ::cblas::Transpose, diag: ::cblas::Diag,
        alpha: f32, A: &::types::MatrixF32, B: &mut ::types::MatrixF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_strsm(side, uplo, transA, diag, alpha, ::ffi::FFI::unwrap(A), ::ffi::FFI::unwrap(B)) }
    }

    /// This function computes the inverse-matrix matrix product B = \alpha op(inv(A))B for Side is Left and B = \alpha B op(inv(A)) for Side is Right.
    /// The matrix A is triangular and op(A) = A, A^T, A^H for TransA = NoTrans, Trans, ConjTrans.
    /// When Uplo is Upper then the upper triangle of A is used, and when Uplo is Lower then the lower triangle of A is used.
    /// If Diag is NonUnit then the diagonal of A is used, but if Diag is Unit then the diagonal elements of the matrix A are taken as unity and are not referenced.
    pub fn dtrsm(side: ::cblas::Side, uplo: ::cblas::Uplo, transA: ::cblas::Transpose, diag: ::cblas::Diag,
        alpha: f64, A: &::types::MatrixF64, B: &mut ::types::MatrixF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_dtrsm(side, uplo, transA, diag, alpha, ::ffi::FFI::unwrap(A), ::ffi::FFI::unwrap(B)) }
    }

    /// This function computes the inverse-matrix matrix product B = \alpha op(inv(A))B for Side is Left and B = \alpha B op(inv(A)) for Side is Right.
    /// The matrix A is triangular and op(A) = A, A^T, A^H for TransA = NoTrans, Trans, ConjTrans.
    /// When Uplo is Upper then the upper triangle of A is used, and when Uplo is Lower then the lower triangle of A is used.
    /// If Diag is NonUnit then the diagonal of A is used, but if Diag is Unit then the diagonal elements of the matrix A are taken as unity and are not referenced.
    pub fn ctrsm(side: ::cblas::Side, uplo: ::cblas::Uplo, transA: ::cblas::Transpose, diag: ::cblas::Diag,
        alpha: &::types::ComplexF32, A: &::types::MatrixComplexF32, B: &mut ::types::MatrixComplexF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_ctrsm(side, uplo, transA, diag, ::std::mem::transmute(*alpha),
            ::ffi::FFI::unwrap(A), ::ffi::FFI::unwrap(B)) }
    }

    /// This function computes the inverse-matrix matrix product B = \alpha op(inv(A))B for Side is Left and B = \alpha B op(inv(A)) for Side is Right.
    /// The matrix A is triangular and op(A) = A, A^T, A^H for TransA = NoTrans, Trans, ConjTrans.
    /// When Uplo is Upper then the upper triangle of A is used, and when Uplo is Lower then the lower triangle of A is used.
    /// If Diag is NonUnit then the diagonal of A is used, but if Diag is Unit then the diagonal elements of the matrix A are taken as unity and are not referenced.
    pub fn ztrsm(side: ::cblas::Side, uplo: ::cblas::Uplo, transA: ::cblas::Transpose, diag: ::cblas::Diag,
        alpha: &::types::ComplexF64, A: &::types::MatrixComplexF64, B: &mut ::types::MatrixComplexF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_ztrsm(side, uplo, transA, diag, ::std::mem::transmute(*alpha),
            ::ffi::FFI::unwrap(A), ::ffi::FFI::unwrap(B)) }
    }

    /// This function computes a rank-k update of the symmetric matrix C, C = \alpha A A^T + \beta C when Trans is NoTrans and C = \alpha A^T A + \beta C when Trans is Trans.
    /// Since the matrix C is symmetric only its upper half or lower half need to be stored.
    /// When Uplo is Upper then the upper triangle and diagonal of C are used, and when Uplo is Lower then the lower triangle and diagonal of C are used.
    pub fn ssyrk(uplo: ::cblas::Uplo, trans: ::cblas::Transpose, alpha: f32, A: &::types::MatrixF32, beta: f32,
        C: &mut ::types::MatrixF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_ssyrk(uplo, trans, alpha, ::ffi::FFI::unwrap(A), beta, ::ffi::FFI::unwrap(C)) }
    }

    /// This function computes a rank-k update of the symmetric matrix C, C = \alpha A A^T + \beta C when Trans is NoTrans and C = \alpha A^T A + \beta C when Trans is Trans.
    /// Since the matrix C is symmetric only its upper half or lower half need to be stored.
    /// When Uplo is Upper then the upper triangle and diagonal of C are used, and when Uplo is Lower then the lower triangle and diagonal of C are used.
    pub fn dsyrk(uplo: ::cblas::Uplo, trans: ::cblas::Transpose, alpha: f64, A: &::types::MatrixF64, beta: f64,
        C: &mut ::types::MatrixF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_dsyrk(uplo, trans, alpha, ::ffi::FFI::unwrap(A), beta, ::ffi::FFI::unwrap(C)) }
    }

    /// This function computes a rank-k update of the symmetric matrix C, C = \alpha A A^T + \beta C when Trans is NoTrans and C = \alpha A^T A + \beta C when Trans is Trans.
    /// Since the matrix C is symmetric only its upper half or lower half need to be stored.
    /// When Uplo is Upper then the upper triangle and diagonal of C are used, and when Uplo is Lower then the lower triangle and diagonal of C are used.
    pub fn csyrk(uplo: ::cblas::Uplo, trans: ::cblas::Transpose, alpha: &::types::ComplexF32, A: &::types::MatrixComplexF32,
        beta: &::types::ComplexF32, C: &mut ::types::MatrixComplexF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_csyrk(uplo, trans, ::std::mem::transmute(*alpha), ::ffi::FFI::unwrap(A),
            ::std::mem::transmute(*beta), ::ffi::FFI::unwrap(C)) }
    }

    /// This function computes a rank-k update of the symmetric matrix C, C = \alpha A A^T + \beta C when Trans is NoTrans and C = \alpha A^T A + \beta C when Trans is Trans.
    /// Since the matrix C is symmetric only its upper half or lower half need to be stored.
    /// When Uplo is Upper then the upper triangle and diagonal of C are used, and when Uplo is Lower then the lower triangle and diagonal of C are used.
    pub fn zsyrk(uplo: ::cblas::Uplo, trans: ::cblas::Transpose, alpha: &::types::ComplexF64, A: &::types::MatrixComplexF64,
        beta: &::types::ComplexF64, C: &mut ::types::MatrixComplexF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_zsyrk(uplo, trans, ::std::mem::transmute(*alpha), ::ffi::FFI::unwrap(A),
            ::std::mem::transmute(*beta), ::ffi::FFI::unwrap(C)) }
    }

    /// These functions compute a rank-k update of the hermitian matrix C, C = \alpha A A^H + \beta C when Trans is NoTrans and C = \alpha A^H A + \beta C when Trans is ConjTrans.
    /// Since the matrix C is hermitian only its upper half or lower half need to be stored.
    /// When Uplo is Upper then the upper triangle and diagonal of C are used, and when Uplo is Lower then the lower triangle and diagonal of C are used.
    /// The imaginary elements of the diagonal are automatically set to zero.
    pub fn cherk(uplo: ::cblas::Uplo, trans: ::cblas::Transpose, alpha: f32, A: &::types::MatrixComplexF32,
        beta: f32, C: &mut ::types::MatrixComplexF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_cherk(uplo, trans, alpha, ::ffi::FFI::unwrap(A), beta, ::ffi::FFI::unwrap(C)) }
    }

    /// These functions compute a rank-k update of the hermitian matrix C, C = \alpha A A^H + \beta C when Trans is NoTrans and C = \alpha A^H A + \beta C when Trans is ConjTrans.
    /// Since the matrix C is hermitian only its upper half or lower half need to be stored.
    /// When Uplo is Upper then the upper triangle and diagonal of C are used, and when Uplo is Lower then the lower triangle and diagonal of C are used.
    /// The imaginary elements of the diagonal are automatically set to zero.
    pub fn zherk(uplo: ::cblas::Uplo, trans: ::cblas::Transpose, alpha: f64, A: &::types::MatrixComplexF64,
        beta: f64, C: &mut ::types::MatrixComplexF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_zherk(uplo, trans, alpha, ::ffi::FFI::unwrap(A), beta, ::ffi::FFI::unwrap(C)) }
    }

    /// This function computes a rank-2k update of the symmetric matrix C, C = \alpha A B^T + \alpha B A^T + \beta C when Trans is NoTrans and C = \alpha A^T B + \alpha B^T A + \beta C when Trans is Trans.
    /// Since the matrix C is symmetric only its upper half or lower half need to be stored.
    /// When Uplo is Upper then the upper triangle and diagonal of C are used, and when Uplo is Lower then the lower triangle and diagonal of C are used.
    pub fn ssyr2k(uplo: ::cblas::Uplo, trans: ::cblas::Transpose, alpha: f32, A: &::types::MatrixF32, B: &::types::MatrixF32,
        beta: f32,  C: &mut ::types::MatrixF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_ssyr2k(uplo, trans, alpha, ::ffi::FFI::unwrap(A),
            ::ffi::FFI::unwrap(B), beta, ::ffi::FFI::unwrap(C)) }
    }

    /// This function computes a rank-2k update of the symmetric matrix C, C = \alpha A B^T + \alpha B A^T + \beta C when Trans is NoTrans and C = \alpha A^T B + \alpha B^T A + \beta C when Trans is Trans.
    /// Since the matrix C is symmetric only its upper half or lower half need to be stored.
    /// When Uplo is Upper then the upper triangle and diagonal of C are used, and when Uplo is Lower then the lower triangle and diagonal of C are used.
    pub fn dsyr2k(uplo: ::cblas::Uplo, trans: ::cblas::Transpose, alpha: f64, A: &::types::MatrixF64, B: &::types::MatrixF64, beta: f64,
        C: &mut ::types::MatrixF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_dsyr2k(uplo, trans, alpha, ::ffi::FFI::unwrap(A),
            ::ffi::FFI::unwrap(B), beta, ::ffi::FFI::unwrap(C)) }
    }

    /// This function computes a rank-2k update of the symmetric matrix C, C = \alpha A B^T + \alpha B A^T + \beta C when Trans is NoTrans and C = \alpha A^T B + \alpha B^T A + \beta C when Trans is Trans.
    /// Since the matrix C is symmetric only its upper half or lower half need to be stored.
    /// When Uplo is Upper then the upper triangle and diagonal of C are used, and when Uplo is Lower then the lower triangle and diagonal of C are used.
    pub fn csyr2k(uplo: ::cblas::Uplo, trans: ::cblas::Transpose, alpha: &::types::ComplexF32, A: &::types::MatrixComplexF32,
        B: &::types::MatrixComplexF32, beta: &::types::ComplexF32, C: &mut ::types::MatrixComplexF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_csyr2k(uplo, trans, ::std::mem::transmute(*alpha), ::ffi::FFI::unwrap(A),
            ::ffi::FFI::unwrap(B), ::std::mem::transmute(*beta), ::ffi::FFI::unwrap(C)) }
    }

    /// This function computes a rank-2k update of the symmetric matrix C, C = \alpha A B^T + \alpha B A^T + \beta C when Trans is NoTrans and C = \alpha A^T B + \alpha B^T A + \beta C when Trans is Trans.
    /// Since the matrix C is symmetric only its upper half or lower half need to be stored.
    /// When Uplo is Upper then the upper triangle and diagonal of C are used, and when Uplo is Lower then the lower triangle and diagonal of C are used.
    pub fn zsyr2k(uplo: ::cblas::Uplo, trans: ::cblas::Transpose, alpha: &::types::ComplexF64, A: &::types::MatrixComplexF64, B: &::types::MatrixComplexF64,
        beta: &::types::ComplexF64, C: &mut ::types::MatrixComplexF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_zsyr2k(uplo, trans, ::std::mem::transmute(*alpha), ::ffi::FFI::unwrap(A),
            ::ffi::FFI::unwrap(B), ::std::mem::transmute(*beta), ::ffi::FFI::unwrap(C)) }
    }
    
    /// This function computes a rank-2k update of the hermitian matrix C, C = \alpha A B^H + \alpha^* B A^H + \beta C when Trans is NoTrans and C = \alpha A^H B + \alpha^* B^H A + \beta C when Trans is ConjTrans.
    /// Since the matrix C is hermitian only its upper half or lower half need to be stored.
    /// When Uplo is Upper then the upper triangle and diagonal of C are used, and when Uplo is Lower then the lower triangle and diagonal of C are used.
    /// The imaginary elements of the diagonal are automatically set to zero.
    pub fn cher2k(uplo: ::cblas::Uplo, trans: ::cblas::Transpose, alpha: &::types::ComplexF32, A: &::types::MatrixComplexF32,
        B: &::types::MatrixComplexF32, beta: f32, C: &mut ::types::MatrixComplexF32) -> enums::Value {
        unsafe { ::ffi::gsl_blas_cher2k(uplo, trans, ::std::mem::transmute(*alpha), ::ffi::FFI::unwrap(A),
            ::ffi::FFI::unwrap(B), beta, ::ffi::FFI::unwrap(C)) }
    }

    /// This function computes a rank-2k update of the hermitian matrix C, C = \alpha A B^H + \alpha^* B A^H + \beta C when Trans is NoTrans and C = \alpha A^H B + \alpha^* B^H A + \beta C when Trans is ConjTrans.
    /// Since the matrix C is hermitian only its upper half or lower half need to be stored.
    /// When Uplo is Upper then the upper triangle and diagonal of C are used, and when Uplo is Lower then the lower triangle and diagonal of C are used.
    /// The imaginary elements of the diagonal are automatically set to zero.
    pub fn zher2k(uplo: ::cblas::Uplo, trans: ::cblas::Transpose, alpha: &::types::ComplexF64, A: &::types::MatrixComplexF64, B: &::types::MatrixComplexF64,
        beta: f64, C: &mut ::types::MatrixComplexF64) -> enums::Value {
        unsafe { ::ffi::gsl_blas_zher2k(uplo, trans, ::std::mem::transmute(*alpha), ::ffi::FFI::unwrap(A),
            ::ffi::FFI::unwrap(B), beta, ::ffi::FFI::unwrap(C)) }
    }
}