~ubuntu-branches/ubuntu/dapper/gsl-ref-html/dapper

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
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
<HTML>
<HEAD>
<!-- This HTML file has been created by texi2html 1.54+ (gsl)
     from /home/bjg/gsl.redhat/doc/gsl-ref.texi on 14 September 2005 -->

<TITLE>GNU Scientific Library -- Reference Manual - BLAS Support</TITLE>
<link href="gsl-ref_13.html" rel=Next>
<link href="gsl-ref_11.html" rel=Previous>
<link href="gsl-ref_toc.html" rel=ToC>

</HEAD>
<BODY>
<p>Go to the <A HREF="gsl-ref_1.html">first</A>, <A HREF="gsl-ref_11.html">previous</A>, <A HREF="gsl-ref_13.html">next</A>, <A HREF="gsl-ref_50.html">last</A> section, <A HREF="gsl-ref_toc.html">table of contents</A>.
<P><HR><P>


<H1><A NAME="SEC215" HREF="gsl-ref_toc.html#TOC215">BLAS Support</A></H1>
<P>
<A NAME="IDX1028"></A>
<A NAME="IDX1029"></A>
<A NAME="IDX1030"></A>
<A NAME="IDX1031"></A>
<A NAME="IDX1032"></A>
<A NAME="IDX1033"></A>

</P>
<P>
The Basic Linear Algebra Subprograms (BLAS) define a set of fundamental
operations on vectors and matrices which can be used to create optimized
higher-level linear algebra functionality.

</P>
<P>
The library provides a low-level layer which corresponds directly to the
C-language BLAS standard, referred to here as "CBLAS", and a
higher-level interface for operations on GSL vectors and matrices.
Users who are interested in simple operations on GSL vector and matrix
objects should use the high-level layer, which is declared in the file
<CODE>gsl_blas.h</CODE>.  This should satisfy the needs of most users.  Note
that GSL matrices are implemented using dense-storage so the interface
only includes the corresponding dense-storage BLAS functions.  The full
BLAS functionality for band-format and packed-format matrices is
available through the low-level CBLAS interface.

</P>
<P>
The interface for the <CODE>gsl_cblas</CODE> layer is specified in the file
<CODE>gsl_cblas.h</CODE>.  This interface corresponds to the BLAS Technical
Forum's draft standard for the C interface to legacy BLAS
implementations. Users who have access to other conforming CBLAS
implementations can use these in place of the version provided by the
library.  Note that users who have only a Fortran BLAS library can
use a CBLAS conformant wrapper to convert it into a CBLAS
library.  A reference CBLAS wrapper for legacy Fortran
implementations exists as part of the draft CBLAS standard and can
be obtained from Netlib.  The complete set of CBLAS functions is
listed in an appendix (see section <A HREF="gsl-ref_43.html#SEC525">GSL CBLAS Library</A>).

</P>
<P>
There are three levels of BLAS operations,

</P>
<DL COMPACT>

<DT><B>Level 1</B>
<DD>
Vector operations, e.g. y = \alpha x + y
<DT><B>Level 2</B>
<DD>
Matrix-vector operations, e.g. y = \alpha A x + \beta y
<DT><B>Level 3</B>
<DD>
Matrix-matrix operations, e.g. C = \alpha A B + C
</DL>
<P>
Each routine has a name which specifies the operation, the type of
matrices involved and their precisions.  Some of the most common
operations and their names are given below,

</P>
<DL COMPACT>

<DT><B>DOT</B>
<DD>
scalar product, x^T y
<DT><B>AXPY</B>
<DD>
vector sum, \alpha x + y
<DT><B>MV</B>
<DD>
matrix-vector product, A x
<DT><B>SV</B>
<DD>
matrix-vector solve, inv(A) x
<DT><B>MM</B>
<DD>
matrix-matrix product, A B
<DT><B>SM</B>
<DD>
matrix-matrix solve, inv(A) B
</DL>
<P>
The types of matrices are,

</P>
<DL COMPACT>

<DT><B>GE</B>
<DD>
general
<DT><B>GB</B>
<DD>
general band
<DT><B>SY</B>
<DD>
symmetric
<DT><B>SB</B>
<DD>
symmetric band
<DT><B>SP</B>
<DD>
symmetric packed
<DT><B>HE</B>
<DD>
hermitian
<DT><B>HB</B>
<DD>
hermitian band
<DT><B>HP</B>
<DD>
hermitian packed
<DT><B>TR</B>
<DD>
triangular 
<DT><B>TB</B>
<DD>
triangular band
<DT><B>TP</B>
<DD>
triangular packed
</DL>
<P>
Each operation is defined for four precisions,

</P>
<DL COMPACT>

<DT><B>S</B>
<DD>
single real
<DT><B>D</B>
<DD>
double real
<DT><B>C</B>
<DD>
single complex
<DT><B>Z</B>
<DD>
double complex
</DL>
<P>
Thus, for example, the name SGEMM stands for "single-precision
general matrix-matrix multiply" and ZGEMM stands for
"double-precision complex matrix-matrix multiply".

</P>



<H2><A NAME="SEC216" HREF="gsl-ref_toc.html#TOC216">GSL BLAS Interface</A></H2>

<P>
GSL provides dense vector and matrix objects, based on the relevant
built-in types.  The library provides an interface to the BLAS
operations which apply to these objects.  The interface to this
functionality is given in the file <CODE>gsl_blas.h</CODE>.

</P>



<H3><A NAME="SEC217" HREF="gsl-ref_toc.html#TOC217">Level 1</A></H3>

<P>
<DL>
<DT><U>Function:</U> int <B>gsl_blas_sdsdot</B> <I>(float <VAR>alpha</VAR>, const gsl_vector_float * <VAR>x</VAR>, const gsl_vector_float * <VAR>y</VAR>, float * <VAR>result</VAR>)</I>
<DD><A NAME="IDX1034"></A>
<A NAME="IDX1035"></A>
This function computes the sum \alpha + x^T y for the vectors
<VAR>x</VAR> and <VAR>y</VAR>, returning the result in <VAR>result</VAR>.
</DL>

</P>
<P>
<DL>
<DT><U>Function:</U> int <B>gsl_blas_sdot</B> <I>(const gsl_vector_float * <VAR>x</VAR>, const gsl_vector_float * <VAR>y</VAR>, float * <VAR>result</VAR>)</I>
<DD><A NAME="IDX1036"></A>
<DT><U>Function:</U> int <B>gsl_blas_dsdot</B> <I>(const gsl_vector_float * <VAR>x</VAR>, const gsl_vector_float * <VAR>y</VAR>, double * <VAR>result</VAR>)</I>
<DD><A NAME="IDX1037"></A>
<DT><U>Function:</U> int <B>gsl_blas_ddot</B> <I>(const gsl_vector * <VAR>x</VAR>, const gsl_vector * <VAR>y</VAR>, double * <VAR>result</VAR>)</I>
<DD><A NAME="IDX1038"></A>
These functions compute the scalar product x^T y for the vectors
<VAR>x</VAR> and <VAR>y</VAR>, returning the result in <VAR>result</VAR>.
</DL>

</P>
<P>
<DL>
<DT><U>Function:</U> int <B>gsl_blas_cdotu</B> <I>(const gsl_vector_complex_float * <VAR>x</VAR>, const gsl_vector_complex_float * <VAR>y</VAR>, gsl_complex_float * <VAR>dotu</VAR>)</I>
<DD><A NAME="IDX1039"></A>
<DT><U>Function:</U> int <B>gsl_blas_zdotu</B> <I>(const gsl_vector_complex * <VAR>x</VAR>, const gsl_vector_complex * <VAR>y</VAR>, gsl_complex * <VAR>dotu</VAR>)</I>
<DD><A NAME="IDX1040"></A>
These functions compute the complex scalar product x^T y for the
vectors <VAR>x</VAR> and <VAR>y</VAR>, returning the result in <VAR>result</VAR>
</DL>

</P>
<P>
<DL>
<DT><U>Function:</U> int <B>gsl_blas_cdotc</B> <I>(const gsl_vector_complex_float * <VAR>x</VAR>, const gsl_vector_complex_float * <VAR>y</VAR>, gsl_complex_float * <VAR>dotc</VAR>)</I>
<DD><A NAME="IDX1041"></A>
<DT><U>Function:</U> int <B>gsl_blas_zdotc</B> <I>(const gsl_vector_complex * <VAR>x</VAR>, const gsl_vector_complex * <VAR>y</VAR>, gsl_complex * <VAR>dotc</VAR>)</I>
<DD><A NAME="IDX1042"></A>
These functions compute the complex conjugate scalar product x^H
y for the vectors <VAR>x</VAR> and <VAR>y</VAR>, returning the result in
<VAR>result</VAR>
</DL>

</P>
<P>
<DL>
<DT><U>Function:</U> float <B>gsl_blas_snrm2</B> <I>(const gsl_vector_float * <VAR>x</VAR>)</I>
<DD><A NAME="IDX1043"></A>
<DT><U>Function:</U> double <B>gsl_blas_dnrm2</B> <I>(const gsl_vector * <VAR>x</VAR>)</I>
<DD><A NAME="IDX1044"></A>
<A NAME="IDX1045"></A>
These functions compute the Euclidean norm 
||x||_2 = \sqrt {\sum x_i^2} of the vector <VAR>x</VAR>.
</DL>

</P>
<P>
<DL>
<DT><U>Function:</U> float <B>gsl_blas_scnrm2</B> <I>(const gsl_vector_complex_float * <VAR>x</VAR>)</I>
<DD><A NAME="IDX1046"></A>
<DT><U>Function:</U> double <B>gsl_blas_dznrm2</B> <I>(const gsl_vector_complex * <VAR>x</VAR>)</I>
<DD><A NAME="IDX1047"></A>
These functions compute the Euclidean norm of the complex vector <VAR>x</VAR>,

</P>

<PRE>
||x||_2 = \sqrt {\sum (\Re(x_i)^2 + \Im(x_i)^2)}.
</PRE>

<P>
</DL>

</P>
<P>
<DL>
<DT><U>Function:</U> float <B>gsl_blas_sasum</B> <I>(const gsl_vector_float * <VAR>x</VAR>)</I>
<DD><A NAME="IDX1048"></A>
<DT><U>Function:</U> double <B>gsl_blas_dasum</B> <I>(const gsl_vector * <VAR>x</VAR>)</I>
<DD><A NAME="IDX1049"></A>
<A NAME="IDX1050"></A>
These functions compute the absolute sum \sum |x_i| of the
elements of the vector <VAR>x</VAR>.
</DL>

</P>
<P>
<DL>
<DT><U>Function:</U> float <B>gsl_blas_scasum</B> <I>(const gsl_vector_complex_float * <VAR>x</VAR>)</I>
<DD><A NAME="IDX1051"></A>
<DT><U>Function:</U> double <B>gsl_blas_dzasum</B> <I>(const gsl_vector_complex * <VAR>x</VAR>)</I>
<DD><A NAME="IDX1052"></A>
These functions compute the sum of the magnitudes of the real and
imaginary parts of the complex vector <VAR>x</VAR>, 
\sum |\Re(x_i)| + |\Im(x_i)|.
</DL>

</P>
<P>
<DL>
<DT><U>Function:</U> CBLAS_INDEX_t <B>gsl_blas_isamax</B> <I>(const gsl_vector_float * <VAR>x</VAR>)</I>
<DD><A NAME="IDX1053"></A>
<DT><U>Function:</U> CBLAS_INDEX_t <B>gsl_blas_idamax</B> <I>(const gsl_vector * <VAR>x</VAR>)</I>
<DD><A NAME="IDX1054"></A>
<DT><U>Function:</U> CBLAS_INDEX_t <B>gsl_blas_icamax</B> <I>(const gsl_vector_complex_float * <VAR>x</VAR>)</I>
<DD><A NAME="IDX1055"></A>
<DT><U>Function:</U> CBLAS_INDEX_t <B>gsl_blas_izamax</B> <I>(const gsl_vector_complex * <VAR>x</VAR>)</I>
<DD><A NAME="IDX1056"></A>
<A NAME="IDX1057"></A>
These functions return the index of the largest element of the vector
<VAR>x</VAR>. 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.
</DL>

</P>
<P>
<DL>
<DT><U>Function:</U> int <B>gsl_blas_sswap</B> <I>(gsl_vector_float * <VAR>x</VAR>, gsl_vector_float * <VAR>y</VAR>)</I>
<DD><A NAME="IDX1058"></A>
<DT><U>Function:</U> int <B>gsl_blas_dswap</B> <I>(gsl_vector * <VAR>x</VAR>, gsl_vector * <VAR>y</VAR>)</I>
<DD><A NAME="IDX1059"></A>
<DT><U>Function:</U> int <B>gsl_blas_cswap</B> <I>(gsl_vector_complex_float * <VAR>x</VAR>, gsl_vector_complex_float * <VAR>y</VAR>)</I>
<DD><A NAME="IDX1060"></A>
<DT><U>Function:</U> int <B>gsl_blas_zswap</B> <I>(gsl_vector_complex * <VAR>x</VAR>, gsl_vector_complex * <VAR>y</VAR>)</I>
<DD><A NAME="IDX1061"></A>
<A NAME="IDX1062"></A>
These functions exchange the elements of the vectors <VAR>x</VAR> and <VAR>y</VAR>.
</DL>

</P>
<P>
<DL>
<DT><U>Function:</U> int <B>gsl_blas_scopy</B> <I>(const gsl_vector_float * <VAR>x</VAR>, gsl_vector_float * <VAR>y</VAR>)</I>
<DD><A NAME="IDX1063"></A>
<DT><U>Function:</U> int <B>gsl_blas_dcopy</B> <I>(const gsl_vector * <VAR>x</VAR>, gsl_vector * <VAR>y</VAR>)</I>
<DD><A NAME="IDX1064"></A>
<DT><U>Function:</U> int <B>gsl_blas_ccopy</B> <I>(const gsl_vector_complex_float * <VAR>x</VAR>, gsl_vector_complex_float * <VAR>y</VAR>)</I>
<DD><A NAME="IDX1065"></A>
<DT><U>Function:</U> int <B>gsl_blas_zcopy</B> <I>(const gsl_vector_complex * <VAR>x</VAR>, gsl_vector_complex * <VAR>y</VAR>)</I>
<DD><A NAME="IDX1066"></A>
<A NAME="IDX1067"></A>
These functions copy the elements of the vector <VAR>x</VAR> into the vector
<VAR>y</VAR>.
</DL>

</P>

<P>
<DL>
<DT><U>Function:</U> int <B>gsl_blas_saxpy</B> <I>(float <VAR>alpha</VAR>, const gsl_vector_float * <VAR>x</VAR>, gsl_vector_float * <VAR>y</VAR>)</I>
<DD><A NAME="IDX1068"></A>
<DT><U>Function:</U> int <B>gsl_blas_daxpy</B> <I>(double <VAR>alpha</VAR>, const gsl_vector * <VAR>x</VAR>, gsl_vector * <VAR>y</VAR>)</I>
<DD><A NAME="IDX1069"></A>
<DT><U>Function:</U> int <B>gsl_blas_caxpy</B> <I>(const gsl_complex_float <VAR>alpha</VAR>, const gsl_vector_complex_float * <VAR>x</VAR>, gsl_vector_complex_float * <VAR>y</VAR>)</I>
<DD><A NAME="IDX1070"></A>
<DT><U>Function:</U> int <B>gsl_blas_zaxpy</B> <I>(const gsl_complex <VAR>alpha</VAR>, const gsl_vector_complex * <VAR>x</VAR>, gsl_vector_complex * <VAR>y</VAR>)</I>
<DD><A NAME="IDX1071"></A>
<A NAME="IDX1072"></A>
These functions compute the sum y = \alpha x + y for the vectors
<VAR>x</VAR> and <VAR>y</VAR>.
</DL>

</P>
<P>
<DL>
<DT><U>Function:</U> void <B>gsl_blas_sscal</B> <I>(float <VAR>alpha</VAR>, gsl_vector_float * <VAR>x</VAR>)</I>
<DD><A NAME="IDX1073"></A>
<DT><U>Function:</U> void <B>gsl_blas_dscal</B> <I>(double <VAR>alpha</VAR>, gsl_vector * <VAR>x</VAR>)</I>
<DD><A NAME="IDX1074"></A>
<DT><U>Function:</U> void <B>gsl_blas_cscal</B> <I>(const gsl_complex_float <VAR>alpha</VAR>, gsl_vector_complex_float * <VAR>x</VAR>)</I>
<DD><A NAME="IDX1075"></A>
<DT><U>Function:</U> void <B>gsl_blas_zscal</B> <I>(const gsl_complex <VAR>alpha</VAR>, gsl_vector_complex * <VAR>x</VAR>)</I>
<DD><A NAME="IDX1076"></A>
<DT><U>Function:</U> void <B>gsl_blas_csscal</B> <I>(float <VAR>alpha</VAR>, gsl_vector_complex_float * <VAR>x</VAR>)</I>
<DD><A NAME="IDX1077"></A>
<DT><U>Function:</U> void <B>gsl_blas_zdscal</B> <I>(double <VAR>alpha</VAR>, gsl_vector_complex * <VAR>x</VAR>)</I>
<DD><A NAME="IDX1078"></A>
<A NAME="IDX1079"></A>
These functions rescale the vector <VAR>x</VAR> by the multiplicative factor
<VAR>alpha</VAR>.
</DL>

</P>
<P>
<DL>
<DT><U>Function:</U> int <B>gsl_blas_srotg</B> <I>(float <VAR>a</VAR>[], float <VAR>b</VAR>[], float <VAR>c</VAR>[], float <VAR>s</VAR>[])</I>
<DD><A NAME="IDX1080"></A>
<DT><U>Function:</U> int <B>gsl_blas_drotg</B> <I>(double <VAR>a</VAR>[], double <VAR>b</VAR>[], double <VAR>c</VAR>[], double <VAR>s</VAR>[])</I>
<DD><A NAME="IDX1081"></A>
<A NAME="IDX1082"></A>
<A NAME="IDX1083"></A>
These functions compute a Givens rotation (c,s) which zeroes the
vector (a,b),

</P>

<PRE>
[  c  s ] [ a ] = [ r ]
[ -s  c ] [ b ]   [ 0 ]
</PRE>

<P>
The variables <VAR>a</VAR> and <VAR>b</VAR> are overwritten by the routine.
</DL>

</P>
<P>
<DL>
<DT><U>Function:</U> int <B>gsl_blas_srot</B> <I>(gsl_vector_float * <VAR>x</VAR>, gsl_vector_float * <VAR>y</VAR>, float <VAR>c</VAR>, float <VAR>s</VAR>)</I>
<DD><A NAME="IDX1084"></A>
<DT><U>Function:</U> int <B>gsl_blas_drot</B> <I>(gsl_vector * <VAR>x</VAR>, gsl_vector * <VAR>y</VAR>, const double <VAR>c</VAR>, const double <VAR>s</VAR>)</I>
<DD><A NAME="IDX1085"></A>
These functions apply a Givens rotation (x', y') = (c x + s y, -s
x + c y) to the vectors <VAR>x</VAR>, <VAR>y</VAR>.
</DL>

</P>
<P>
<DL>
<DT><U>Function:</U> int <B>gsl_blas_srotmg</B> <I>(float <VAR>d1</VAR>[], float <VAR>d2</VAR>[], float <VAR>b1</VAR>[], float <VAR>b2</VAR>, float <VAR>P</VAR>[])</I>
<DD><A NAME="IDX1086"></A>
<DT><U>Function:</U> int <B>gsl_blas_drotmg</B> <I>(double <VAR>d1</VAR>[], double <VAR>d2</VAR>[], double <VAR>b1</VAR>[], double <VAR>b2</VAR>, double <VAR>P</VAR>[])</I>
<DD><A NAME="IDX1087"></A>
<A NAME="IDX1088"></A>
<A NAME="IDX1089"></A>
These functions compute a modified Givens transformation.  The modified
Givens transformation is defined in the original Level-1 BLAS
specification, given in the references.
</DL>

</P>
<P>
<DL>
<DT><U>Function:</U> int <B>gsl_blas_srotm</B> <I>(gsl_vector_float * <VAR>x</VAR>, gsl_vector_float * <VAR>y</VAR>, const float <VAR>P</VAR>[])</I>
<DD><A NAME="IDX1090"></A>
<DT><U>Function:</U> int <B>gsl_blas_drotm</B> <I>(gsl_vector * <VAR>x</VAR>, gsl_vector * <VAR>y</VAR>, const double <VAR>P</VAR>[])</I>
<DD><A NAME="IDX1091"></A>
These functions apply a modified Givens transformation.  
</DL>

</P>


<H3><A NAME="SEC218" HREF="gsl-ref_toc.html#TOC218">Level 2</A></H3>

<P>
<DL>
<DT><U>Function:</U> int <B>gsl_blas_sgemv</B> <I>(CBLAS_TRANSPOSE_t <VAR>TransA</VAR>, float <VAR>alpha</VAR>, const gsl_matrix_float * <VAR>A</VAR>, const gsl_vector_float * <VAR>x</VAR>, float <VAR>beta</VAR>, gsl_vector_float * <VAR>y</VAR>)</I>
<DD><A NAME="IDX1092"></A>
<DT><U>Function:</U> int <B>gsl_blas_dgemv</B> <I>(CBLAS_TRANSPOSE_t <VAR>TransA</VAR>, double <VAR>alpha</VAR>, const gsl_matrix * <VAR>A</VAR>, const gsl_vector * <VAR>x</VAR>, double <VAR>beta</VAR>, gsl_vector * <VAR>y</VAR>)</I>
<DD><A NAME="IDX1093"></A>
<DT><U>Function:</U> int <B>gsl_blas_cgemv</B> <I>(CBLAS_TRANSPOSE_t <VAR>TransA</VAR>, const gsl_complex_float <VAR>alpha</VAR>, const gsl_matrix_complex_float * <VAR>A</VAR>, const gsl_vector_complex_float * <VAR>x</VAR>, const gsl_complex_float <VAR>beta</VAR>, gsl_vector_complex_float * <VAR>y</VAR>)</I>
<DD><A NAME="IDX1094"></A>
<DT><U>Function:</U> int <B>gsl_blas_zgemv</B> <I>(CBLAS_TRANSPOSE_t <VAR>TransA</VAR>, const gsl_complex <VAR>alpha</VAR>, const gsl_matrix_complex * <VAR>A</VAR>, const gsl_vector_complex * <VAR>x</VAR>, const gsl_complex <VAR>beta</VAR>, gsl_vector_complex * <VAR>y</VAR>)</I>
<DD><A NAME="IDX1095"></A>
<A NAME="IDX1096"></A>
These functions compute the matrix-vector product and sum y =
\alpha op(A) x + \beta y, where op(A) = A,
A^T, A^H for <VAR>TransA</VAR> = <CODE>CblasNoTrans</CODE>,
<CODE>CblasTrans</CODE>, <CODE>CblasConjTrans</CODE>.
</DL>

</P>

<P>
<DL>
<DT><U>Function:</U> int <B>gsl_blas_strmv</B> <I>(CBLAS_UPLO_t <VAR>Uplo</VAR>, CBLAS_TRANSPOSE_t <VAR>TransA</VAR>, CBLAS_DIAG_t <VAR>Diag</VAR>, const gsl_matrix_float * <VAR>A</VAR>, gsl_vector_float * <VAR>x</VAR>)</I>
<DD><A NAME="IDX1097"></A>
<DT><U>Function:</U> int <B>gsl_blas_dtrmv</B> <I>(CBLAS_UPLO_t <VAR>Uplo</VAR>, CBLAS_TRANSPOSE_t <VAR>TransA</VAR>, CBLAS_DIAG_t <VAR>Diag</VAR>, const gsl_matrix * <VAR>A</VAR>, gsl_vector * <VAR>x</VAR>)</I>
<DD><A NAME="IDX1098"></A>
<DT><U>Function:</U> int <B>gsl_blas_ctrmv</B> <I>(CBLAS_UPLO_t <VAR>Uplo</VAR>, CBLAS_TRANSPOSE_t <VAR>TransA</VAR>, CBLAS_DIAG_t <VAR>Diag</VAR>, const gsl_matrix_complex_float * <VAR>A</VAR>, gsl_vector_complex_float * <VAR>x</VAR>)</I>
<DD><A NAME="IDX1099"></A>
<DT><U>Function:</U> int <B>gsl_blas_ztrmv</B> <I>(CBLAS_UPLO_t <VAR>Uplo</VAR>, CBLAS_TRANSPOSE_t <VAR>TransA</VAR>, CBLAS_DIAG_t <VAR>Diag</VAR>, const gsl_matrix_complex * <VAR>A</VAR>, gsl_vector_complex * <VAR>x</VAR>)</I>
<DD><A NAME="IDX1100"></A>
<A NAME="IDX1101"></A>
These functions compute the matrix-vector product 
x =\alpha op(A) x for the triangular matrix <VAR>A</VAR>, where
op(A) = A, A^T, A^H for <VAR>TransA</VAR> =
<CODE>CblasNoTrans</CODE>, <CODE>CblasTrans</CODE>, <CODE>CblasConjTrans</CODE>.  When
<VAR>Uplo</VAR> is <CODE>CblasUpper</CODE> then the upper triangle of <VAR>A</VAR> is
used, and when <VAR>Uplo</VAR> is <CODE>CblasLower</CODE> then the lower triangle
of <VAR>A</VAR> is used.  If <VAR>Diag</VAR> is <CODE>CblasNonUnit</CODE> then the
diagonal of the matrix is used, but if <VAR>Diag</VAR> is <CODE>CblasUnit</CODE>
then the diagonal elements of the matrix <VAR>A</VAR> are taken as unity and
are not referenced.
</DL>

</P>

<P>
<DL>
<DT><U>Function:</U> int <B>gsl_blas_strsv</B> <I>(CBLAS_UPLO_t <VAR>Uplo</VAR>, CBLAS_TRANSPOSE_t <VAR>TransA</VAR>, CBLAS_DIAG_t <VAR>Diag</VAR>, const gsl_matrix_float * <VAR>A</VAR>, gsl_vector_float * <VAR>x</VAR>)</I>
<DD><A NAME="IDX1102"></A>
<DT><U>Function:</U> int <B>gsl_blas_dtrsv</B> <I>(CBLAS_UPLO_t <VAR>Uplo</VAR>, CBLAS_TRANSPOSE_t <VAR>TransA</VAR>, CBLAS_DIAG_t <VAR>Diag</VAR>, const gsl_matrix * <VAR>A</VAR>, gsl_vector * <VAR>x</VAR>)</I>
<DD><A NAME="IDX1103"></A>
<DT><U>Function:</U> int <B>gsl_blas_ctrsv</B> <I>(CBLAS_UPLO_t <VAR>Uplo</VAR>, CBLAS_TRANSPOSE_t <VAR>TransA</VAR>, CBLAS_DIAG_t <VAR>Diag</VAR>, const gsl_matrix_complex_float * <VAR>A</VAR>, gsl_vector_complex_float * <VAR>x</VAR>)</I>
<DD><A NAME="IDX1104"></A>
<DT><U>Function:</U> int <B>gsl_blas_ztrsv</B> <I>(CBLAS_UPLO_t <VAR>Uplo</VAR>, CBLAS_TRANSPOSE_t <VAR>TransA</VAR>, CBLAS_DIAG_t <VAR>Diag</VAR>, const gsl_matrix_complex * <VAR>A</VAR>, gsl_vector_complex * <VAR>x</VAR>)</I>
<DD><A NAME="IDX1105"></A>
<A NAME="IDX1106"></A>
These functions compute inv(op(A)) x for <VAR>x</VAR>, where
op(A) = A, A^T, A^H for <VAR>TransA</VAR> =
<CODE>CblasNoTrans</CODE>, <CODE>CblasTrans</CODE>, <CODE>CblasConjTrans</CODE>.  When
<VAR>Uplo</VAR> is <CODE>CblasUpper</CODE> then the upper triangle of <VAR>A</VAR> is
used, and when <VAR>Uplo</VAR> is <CODE>CblasLower</CODE> then the lower triangle
of <VAR>A</VAR> is used.  If <VAR>Diag</VAR> is <CODE>CblasNonUnit</CODE> then the
diagonal of the matrix is used, but if <VAR>Diag</VAR> is <CODE>CblasUnit</CODE>
then the diagonal elements of the matrix <VAR>A</VAR> are taken as unity and
are not referenced.
</DL>

</P>

<P>
<DL>
<DT><U>Function:</U> int <B>gsl_blas_ssymv</B> <I>(CBLAS_UPLO_t <VAR>Uplo</VAR>, float <VAR>alpha</VAR>, const gsl_matrix_float * <VAR>A</VAR>, const gsl_vector_float * <VAR>x</VAR>, float <VAR>beta</VAR>, gsl_vector_float * <VAR>y</VAR>)</I>
<DD><A NAME="IDX1107"></A>
<DT><U>Function:</U> int <B>gsl_blas_dsymv</B> <I>(CBLAS_UPLO_t <VAR>Uplo</VAR>, double <VAR>alpha</VAR>, const gsl_matrix * <VAR>A</VAR>, const gsl_vector * <VAR>x</VAR>, double <VAR>beta</VAR>, gsl_vector * <VAR>y</VAR>)</I>
<DD><A NAME="IDX1108"></A>
<A NAME="IDX1109"></A>
These functions compute the matrix-vector product and sum y =
\alpha A x + \beta y for the symmetric matrix <VAR>A</VAR>.  Since the
matrix <VAR>A</VAR> is symmetric only its upper half or lower half need to be
stored.  When <VAR>Uplo</VAR> is <CODE>CblasUpper</CODE> then the upper triangle
and diagonal of <VAR>A</VAR> are used, and when <VAR>Uplo</VAR> is
<CODE>CblasLower</CODE> then the lower triangle and diagonal of <VAR>A</VAR> are
used.
</DL>

</P>
<P>
<DL>
<DT><U>Function:</U> int <B>gsl_blas_chemv</B> <I>(CBLAS_UPLO_t <VAR>Uplo</VAR>, const gsl_complex_float <VAR>alpha</VAR>, const gsl_matrix_complex_float * <VAR>A</VAR>, const gsl_vector_complex_float * <VAR>x</VAR>, const gsl_complex_float <VAR>beta</VAR>, gsl_vector_complex_float * <VAR>y</VAR>)</I>
<DD><A NAME="IDX1110"></A>
<DT><U>Function:</U> int <B>gsl_blas_zhemv</B> <I>(CBLAS_UPLO_t <VAR>Uplo</VAR>, const gsl_complex <VAR>alpha</VAR>, const gsl_matrix_complex * <VAR>A</VAR>, const gsl_vector_complex * <VAR>x</VAR>, const gsl_complex <VAR>beta</VAR>, gsl_vector_complex * <VAR>y</VAR>)</I>
<DD><A NAME="IDX1111"></A>
<A NAME="IDX1112"></A>
These functions compute the matrix-vector product and sum y =
\alpha A x + \beta y for the hermitian matrix <VAR>A</VAR>.  Since the
matrix <VAR>A</VAR> is hermitian only its upper half or lower half need to be
stored.  When <VAR>Uplo</VAR> is <CODE>CblasUpper</CODE> then the upper triangle
and diagonal of <VAR>A</VAR> are used, and when <VAR>Uplo</VAR> is
<CODE>CblasLower</CODE> then the lower triangle and diagonal of <VAR>A</VAR> are
used.  The imaginary elements of the diagonal are automatically assumed
to be zero and are not referenced.
</DL>

</P>
<P>
<DL>
<DT><U>Function:</U> int <B>gsl_blas_sger</B> <I>(float <VAR>alpha</VAR>, const gsl_vector_float * <VAR>x</VAR>, const gsl_vector_float * <VAR>y</VAR>, gsl_matrix_float * <VAR>A</VAR>)</I>
<DD><A NAME="IDX1113"></A>
<DT><U>Function:</U> int <B>gsl_blas_dger</B> <I>(double <VAR>alpha</VAR>, const gsl_vector * <VAR>x</VAR>, const gsl_vector * <VAR>y</VAR>, gsl_matrix * <VAR>A</VAR>)</I>
<DD><A NAME="IDX1114"></A>
<DT><U>Function:</U> int <B>gsl_blas_cgeru</B> <I>(const gsl_complex_float <VAR>alpha</VAR>, const gsl_vector_complex_float * <VAR>x</VAR>, const gsl_vector_complex_float * <VAR>y</VAR>, gsl_matrix_complex_float * <VAR>A</VAR>)</I>
<DD><A NAME="IDX1115"></A>
<DT><U>Function:</U> int <B>gsl_blas_zgeru</B> <I>(const gsl_complex <VAR>alpha</VAR>, const gsl_vector_complex * <VAR>x</VAR>, const gsl_vector_complex * <VAR>y</VAR>, gsl_matrix_complex * <VAR>A</VAR>)</I>
<DD><A NAME="IDX1116"></A>
<A NAME="IDX1117"></A>
<A NAME="IDX1118"></A>
These functions compute the rank-1 update A = \alpha x y^T + A of
the matrix <VAR>A</VAR>.
</DL>

</P>
<P>
<DL>
<DT><U>Function:</U> int <B>gsl_blas_cgerc</B> <I>(const gsl_complex_float <VAR>alpha</VAR>, const gsl_vector_complex_float * <VAR>x</VAR>, const gsl_vector_complex_float * <VAR>y</VAR>, gsl_matrix_complex_float * <VAR>A</VAR>)</I>
<DD><A NAME="IDX1119"></A>
<DT><U>Function:</U> int <B>gsl_blas_zgerc</B> <I>(const gsl_complex <VAR>alpha</VAR>, const gsl_vector_complex * <VAR>x</VAR>, const gsl_vector_complex * <VAR>y</VAR>, gsl_matrix_complex * <VAR>A</VAR>)</I>
<DD><A NAME="IDX1120"></A>
<A NAME="IDX1121"></A>
These functions compute the conjugate rank-1 update A = \alpha x
y^H + A of the matrix <VAR>A</VAR>.
</DL>

</P>
<P>
<DL>
<DT><U>Function:</U> int <B>gsl_blas_ssyr</B> <I>(CBLAS_UPLO_t <VAR>Uplo</VAR>, float <VAR>alpha</VAR>, const gsl_vector_float * <VAR>x</VAR>, gsl_matrix_float * <VAR>A</VAR>)</I>
<DD><A NAME="IDX1122"></A>
<DT><U>Function:</U> int <B>gsl_blas_dsyr</B> <I>(CBLAS_UPLO_t <VAR>Uplo</VAR>, double <VAR>alpha</VAR>, const gsl_vector * <VAR>x</VAR>, gsl_matrix * <VAR>A</VAR>)</I>
<DD><A NAME="IDX1123"></A>
<A NAME="IDX1124"></A>
These functions compute the symmetric rank-1 update A = \alpha x
x^T + A of the symmetric matrix <VAR>A</VAR>.  Since the matrix <VAR>A</VAR> is
symmetric only its upper half or lower half need to be stored.  When
<VAR>Uplo</VAR> is <CODE>CblasUpper</CODE> then the upper triangle and diagonal of
<VAR>A</VAR> are used, and when <VAR>Uplo</VAR> is <CODE>CblasLower</CODE> then the
lower triangle and diagonal of <VAR>A</VAR> are used.
</DL>

</P>
<P>
<DL>
<DT><U>Function:</U> int <B>gsl_blas_cher</B> <I>(CBLAS_UPLO_t <VAR>Uplo</VAR>, float <VAR>alpha</VAR>, const gsl_vector_complex_float * <VAR>x</VAR>, gsl_matrix_complex_float * <VAR>A</VAR>)</I>
<DD><A NAME="IDX1125"></A>
<DT><U>Function:</U> int <B>gsl_blas_zher</B> <I>(CBLAS_UPLO_t <VAR>Uplo</VAR>, double <VAR>alpha</VAR>, const gsl_vector_complex * <VAR>x</VAR>, gsl_matrix_complex * <VAR>A</VAR>)</I>
<DD><A NAME="IDX1126"></A>
<A NAME="IDX1127"></A>
These functions compute the hermitian rank-1 update A = \alpha x
x^H + A of the hermitian matrix <VAR>A</VAR>.  Since the matrix <VAR>A</VAR> is
hermitian only its upper half or lower half need to be stored.  When
<VAR>Uplo</VAR> is <CODE>CblasUpper</CODE> then the upper triangle and diagonal of
<VAR>A</VAR> are used, and when <VAR>Uplo</VAR> is <CODE>CblasLower</CODE> then the
lower triangle and diagonal of <VAR>A</VAR> are used.  The imaginary elements
of the diagonal are automatically set to zero.
</DL>

</P>
<P>
<DL>
<DT><U>Function:</U> int <B>gsl_blas_ssyr2</B> <I>(CBLAS_UPLO_t <VAR>Uplo</VAR>, float <VAR>alpha</VAR>, const gsl_vector_float * <VAR>x</VAR>, const gsl_vector_float * <VAR>y</VAR>, gsl_matrix_float * <VAR>A</VAR>)</I>
<DD><A NAME="IDX1128"></A>
<DT><U>Function:</U> int <B>gsl_blas_dsyr2</B> <I>(CBLAS_UPLO_t <VAR>Uplo</VAR>, double <VAR>alpha</VAR>, const gsl_vector * <VAR>x</VAR>, const gsl_vector * <VAR>y</VAR>, gsl_matrix * <VAR>A</VAR>)</I>
<DD><A NAME="IDX1129"></A>
<A NAME="IDX1130"></A>
These functions compute the symmetric rank-2 update A = \alpha x
y^T + \alpha y x^T + A of the symmetric matrix <VAR>A</VAR>.  Since the
matrix <VAR>A</VAR> is symmetric only its upper half or lower half need to be
stored.  When <VAR>Uplo</VAR> is <CODE>CblasUpper</CODE> then the upper triangle
and diagonal of <VAR>A</VAR> are used, and when <VAR>Uplo</VAR> is
<CODE>CblasLower</CODE> then the lower triangle and diagonal of <VAR>A</VAR> are
used.
</DL>

</P>
<P>
<DL>
<DT><U>Function:</U> int <B>gsl_blas_cher2</B> <I>(CBLAS_UPLO_t <VAR>Uplo</VAR>, const gsl_complex_float <VAR>alpha</VAR>, const gsl_vector_complex_float * <VAR>x</VAR>, const gsl_vector_complex_float * <VAR>y</VAR>, gsl_matrix_complex_float * <VAR>A</VAR>)</I>
<DD><A NAME="IDX1131"></A>
<DT><U>Function:</U> int <B>gsl_blas_zher2</B> <I>(CBLAS_UPLO_t <VAR>Uplo</VAR>, const gsl_complex <VAR>alpha</VAR>, const gsl_vector_complex * <VAR>x</VAR>, const gsl_vector_complex * <VAR>y</VAR>, gsl_matrix_complex * <VAR>A</VAR>)</I>
<DD><A NAME="IDX1132"></A>
<A NAME="IDX1133"></A>
These functions compute the hermitian rank-2 update A = \alpha x
y^H + \alpha^* y x^H A of the hermitian matrix <VAR>A</VAR>.  Since the
matrix <VAR>A</VAR> is hermitian only its upper half or lower half need to be
stored.  When <VAR>Uplo</VAR> is <CODE>CblasUpper</CODE> then the upper triangle
and diagonal of <VAR>A</VAR> are used, and when <VAR>Uplo</VAR> is
<CODE>CblasLower</CODE> then the lower triangle and diagonal of <VAR>A</VAR> are
used.  The imaginary elements of the diagonal are automatically set to zero.
</DL>

</P>


<H3><A NAME="SEC219" HREF="gsl-ref_toc.html#TOC219">Level 3</A></H3>

<P>
<DL>
<DT><U>Function:</U> int <B>gsl_blas_sgemm</B> <I>(CBLAS_TRANSPOSE_t <VAR>TransA</VAR>, CBLAS_TRANSPOSE_t <VAR>TransB</VAR>, float <VAR>alpha</VAR>, const gsl_matrix_float * <VAR>A</VAR>, const gsl_matrix_float * <VAR>B</VAR>, float <VAR>beta</VAR>, gsl_matrix_float * <VAR>C</VAR>)</I>
<DD><A NAME="IDX1134"></A>
<DT><U>Function:</U> int <B>gsl_blas_dgemm</B> <I>(CBLAS_TRANSPOSE_t <VAR>TransA</VAR>, CBLAS_TRANSPOSE_t <VAR>TransB</VAR>, double <VAR>alpha</VAR>, const gsl_matrix * <VAR>A</VAR>, const gsl_matrix * <VAR>B</VAR>, double <VAR>beta</VAR>, gsl_matrix * <VAR>C</VAR>)</I>
<DD><A NAME="IDX1135"></A>
<DT><U>Function:</U> int <B>gsl_blas_cgemm</B> <I>(CBLAS_TRANSPOSE_t <VAR>TransA</VAR>, CBLAS_TRANSPOSE_t <VAR>TransB</VAR>, const gsl_complex_float <VAR>alpha</VAR>, const gsl_matrix_complex_float * <VAR>A</VAR>, const gsl_matrix_complex_float * <VAR>B</VAR>, const gsl_complex_float <VAR>beta</VAR>, gsl_matrix_complex_float * <VAR>C</VAR>)</I>
<DD><A NAME="IDX1136"></A>
<DT><U>Function:</U> int <B>gsl_blas_zgemm</B> <I>(CBLAS_TRANSPOSE_t <VAR>TransA</VAR>, CBLAS_TRANSPOSE_t <VAR>TransB</VAR>, const gsl_complex <VAR>alpha</VAR>, const gsl_matrix_complex * <VAR>A</VAR>, const gsl_matrix_complex * <VAR>B</VAR>, const gsl_complex <VAR>beta</VAR>, gsl_matrix_complex * <VAR>C</VAR>)</I>
<DD><A NAME="IDX1137"></A>
<A NAME="IDX1138"></A>
These functions compute the matrix-matrix product and sum C =
\alpha op(A) op(B) + \beta C where op(A) = A, A^T,
A^H for <VAR>TransA</VAR> = <CODE>CblasNoTrans</CODE>, <CODE>CblasTrans</CODE>,
<CODE>CblasConjTrans</CODE> and similarly for the parameter <VAR>TransB</VAR>.
</DL>

</P>

<P>
<DL>
<DT><U>Function:</U> int <B>gsl_blas_ssymm</B> <I>(CBLAS_SIDE_t <VAR>Side</VAR>, CBLAS_UPLO_t <VAR>Uplo</VAR>, float <VAR>alpha</VAR>, const gsl_matrix_float * <VAR>A</VAR>, const gsl_matrix_float * <VAR>B</VAR>, float <VAR>beta</VAR>, gsl_matrix_float * <VAR>C</VAR>)</I>
<DD><A NAME="IDX1139"></A>
<DT><U>Function:</U> int <B>gsl_blas_dsymm</B> <I>(CBLAS_SIDE_t <VAR>Side</VAR>, CBLAS_UPLO_t <VAR>Uplo</VAR>, double <VAR>alpha</VAR>, const gsl_matrix * <VAR>A</VAR>, const gsl_matrix * <VAR>B</VAR>, double <VAR>beta</VAR>, gsl_matrix * <VAR>C</VAR>)</I>
<DD><A NAME="IDX1140"></A>
<DT><U>Function:</U> int <B>gsl_blas_csymm</B> <I>(CBLAS_SIDE_t <VAR>Side</VAR>, CBLAS_UPLO_t <VAR>Uplo</VAR>, const gsl_complex_float <VAR>alpha</VAR>, const gsl_matrix_complex_float * <VAR>A</VAR>, const gsl_matrix_complex_float * <VAR>B</VAR>, const gsl_complex_float <VAR>beta</VAR>, gsl_matrix_complex_float * <VAR>C</VAR>)</I>
<DD><A NAME="IDX1141"></A>
<DT><U>Function:</U> int <B>gsl_blas_zsymm</B> <I>(CBLAS_SIDE_t <VAR>Side</VAR>, CBLAS_UPLO_t <VAR>Uplo</VAR>, const gsl_complex <VAR>alpha</VAR>, const gsl_matrix_complex * <VAR>A</VAR>, const gsl_matrix_complex * <VAR>B</VAR>, const gsl_complex <VAR>beta</VAR>, gsl_matrix_complex * <VAR>C</VAR>)</I>
<DD><A NAME="IDX1142"></A>
<A NAME="IDX1143"></A>
These functions compute the matrix-matrix product and sum C =
\alpha A B + \beta C for <VAR>Side</VAR> is <CODE>CblasLeft</CODE> and C =
\alpha B A + \beta C for <VAR>Side</VAR> is <CODE>CblasRight</CODE>, where the
matrix <VAR>A</VAR> is symmetric.  When <VAR>Uplo</VAR> is <CODE>CblasUpper</CODE> then
the upper triangle and diagonal of <VAR>A</VAR> are used, and when <VAR>Uplo</VAR>
is <CODE>CblasLower</CODE> then the lower triangle and diagonal of <VAR>A</VAR> are
used.
</DL>

</P>
<P>
<DL>
<DT><U>Function:</U> int <B>gsl_blas_chemm</B> <I>(CBLAS_SIDE_t <VAR>Side</VAR>, CBLAS_UPLO_t <VAR>Uplo</VAR>, const gsl_complex_float <VAR>alpha</VAR>, const gsl_matrix_complex_float * <VAR>A</VAR>, const gsl_matrix_complex_float * <VAR>B</VAR>, const gsl_complex_float <VAR>beta</VAR>, gsl_matrix_complex_float * <VAR>C</VAR>)</I>
<DD><A NAME="IDX1144"></A>
<DT><U>Function:</U> int <B>gsl_blas_zhemm</B> <I>(CBLAS_SIDE_t <VAR>Side</VAR>, CBLAS_UPLO_t <VAR>Uplo</VAR>, const gsl_complex <VAR>alpha</VAR>, const gsl_matrix_complex * <VAR>A</VAR>, const gsl_matrix_complex * <VAR>B</VAR>, const gsl_complex <VAR>beta</VAR>, gsl_matrix_complex * <VAR>C</VAR>)</I>
<DD><A NAME="IDX1145"></A>
<A NAME="IDX1146"></A>
These functions compute the matrix-matrix product and sum C =
\alpha A B + \beta C for <VAR>Side</VAR> is <CODE>CblasLeft</CODE> and C =
\alpha B A + \beta C for <VAR>Side</VAR> is <CODE>CblasRight</CODE>, where the
matrix <VAR>A</VAR> is hermitian.  When <VAR>Uplo</VAR> is <CODE>CblasUpper</CODE> then
the upper triangle and diagonal of <VAR>A</VAR> are used, and when <VAR>Uplo</VAR>
is <CODE>CblasLower</CODE> then the lower triangle and diagonal of <VAR>A</VAR> are
used.  The imaginary elements of the diagonal are automatically set to
zero.
</DL>

</P>
<P>
<DL>
<DT><U>Function:</U> int <B>gsl_blas_strmm</B> <I>(CBLAS_SIDE_t <VAR>Side</VAR>, CBLAS_UPLO_t <VAR>Uplo</VAR>, CBLAS_TRANSPOSE_t <VAR>TransA</VAR>, CBLAS_DIAG_t <VAR>Diag</VAR>, float <VAR>alpha</VAR>, const gsl_matrix_float * <VAR>A</VAR>, gsl_matrix_float * <VAR>B</VAR>)</I>
<DD><A NAME="IDX1147"></A>
<DT><U>Function:</U> int <B>gsl_blas_dtrmm</B> <I>(CBLAS_SIDE_t <VAR>Side</VAR>, CBLAS_UPLO_t <VAR>Uplo</VAR>, CBLAS_TRANSPOSE_t <VAR>TransA</VAR>, CBLAS_DIAG_t <VAR>Diag</VAR>, double <VAR>alpha</VAR>, const gsl_matrix * <VAR>A</VAR>, gsl_matrix * <VAR>B</VAR>)</I>
<DD><A NAME="IDX1148"></A>
<DT><U>Function:</U> int <B>gsl_blas_ctrmm</B> <I>(CBLAS_SIDE_t <VAR>Side</VAR>, CBLAS_UPLO_t <VAR>Uplo</VAR>, CBLAS_TRANSPOSE_t <VAR>TransA</VAR>, CBLAS_DIAG_t <VAR>Diag</VAR>, const gsl_complex_float <VAR>alpha</VAR>, const gsl_matrix_complex_float * <VAR>A</VAR>, gsl_matrix_complex_float * <VAR>B</VAR>)</I>
<DD><A NAME="IDX1149"></A>
<DT><U>Function:</U> int <B>gsl_blas_ztrmm</B> <I>(CBLAS_SIDE_t <VAR>Side</VAR>, CBLAS_UPLO_t <VAR>Uplo</VAR>, CBLAS_TRANSPOSE_t <VAR>TransA</VAR>, CBLAS_DIAG_t <VAR>Diag</VAR>, const gsl_complex <VAR>alpha</VAR>, const gsl_matrix_complex * <VAR>A</VAR>, gsl_matrix_complex * <VAR>B</VAR>)</I>
<DD><A NAME="IDX1150"></A>
<A NAME="IDX1151"></A>
These functions compute the matrix-matrix product B = \alpha op(A)
B for <VAR>Side</VAR> is <CODE>CblasLeft</CODE> and B = \alpha B op(A) for
<VAR>Side</VAR> is <CODE>CblasRight</CODE>.  The matrix <VAR>A</VAR> is triangular and
op(A) = A, A^T, A^H for <VAR>TransA</VAR> =
<CODE>CblasNoTrans</CODE>, <CODE>CblasTrans</CODE>, <CODE>CblasConjTrans</CODE> When
<VAR>Uplo</VAR> is <CODE>CblasUpper</CODE> then the upper triangle of <VAR>A</VAR> is
used, and when <VAR>Uplo</VAR> is <CODE>CblasLower</CODE> then the lower triangle
of <VAR>A</VAR> is used.  If <VAR>Diag</VAR> is <CODE>CblasNonUnit</CODE> then the
diagonal of <VAR>A</VAR> is used, but if <VAR>Diag</VAR> is <CODE>CblasUnit</CODE> then
the diagonal elements of the matrix <VAR>A</VAR> are taken as unity and are
not referenced.
</DL>

</P>

<P>
<DL>
<DT><U>Function:</U> int <B>gsl_blas_strsm</B> <I>(CBLAS_SIDE_t <VAR>Side</VAR>, CBLAS_UPLO_t <VAR>Uplo</VAR>, CBLAS_TRANSPOSE_t <VAR>TransA</VAR>, CBLAS_DIAG_t <VAR>Diag</VAR>, float <VAR>alpha</VAR>, const gsl_matrix_float * <VAR>A</VAR>, gsl_matrix_float * <VAR>B</VAR>)</I>
<DD><A NAME="IDX1152"></A>
<DT><U>Function:</U> int <B>gsl_blas_dtrsm</B> <I>(CBLAS_SIDE_t <VAR>Side</VAR>, CBLAS_UPLO_t <VAR>Uplo</VAR>, CBLAS_TRANSPOSE_t <VAR>TransA</VAR>, CBLAS_DIAG_t <VAR>Diag</VAR>, double <VAR>alpha</VAR>, const gsl_matrix * <VAR>A</VAR>, gsl_matrix * <VAR>B</VAR>)</I>
<DD><A NAME="IDX1153"></A>
<DT><U>Function:</U> int <B>gsl_blas_ctrsm</B> <I>(CBLAS_SIDE_t <VAR>Side</VAR>, CBLAS_UPLO_t <VAR>Uplo</VAR>, CBLAS_TRANSPOSE_t <VAR>TransA</VAR>, CBLAS_DIAG_t <VAR>Diag</VAR>, const gsl_complex_float <VAR>alpha</VAR>, const gsl_matrix_complex_float * <VAR>A</VAR>, gsl_matrix_complex_float * <VAR>B</VAR>)</I>
<DD><A NAME="IDX1154"></A>
<DT><U>Function:</U> int <B>gsl_blas_ztrsm</B> <I>(CBLAS_SIDE_t <VAR>Side</VAR>, CBLAS_UPLO_t <VAR>Uplo</VAR>, CBLAS_TRANSPOSE_t <VAR>TransA</VAR>, CBLAS_DIAG_t <VAR>Diag</VAR>, const gsl_complex <VAR>alpha</VAR>, const gsl_matrix_complex * <VAR>A</VAR>, gsl_matrix_complex * <VAR>B</VAR>)</I>
<DD><A NAME="IDX1155"></A>
<A NAME="IDX1156"></A>
These functions compute the inverse-matrix matrix product 
B = \alpha op(inv(A))B for <VAR>Side</VAR> is 
<CODE>CblasLeft</CODE> and B = \alpha B op(inv(A)) for
<VAR>Side</VAR> is <CODE>CblasRight</CODE>.  The matrix <VAR>A</VAR> is triangular and
op(A) = A, A^T, A^H for <VAR>TransA</VAR> =
<CODE>CblasNoTrans</CODE>, <CODE>CblasTrans</CODE>, <CODE>CblasConjTrans</CODE> When
<VAR>Uplo</VAR> is <CODE>CblasUpper</CODE> then the upper triangle of <VAR>A</VAR> is
used, and when <VAR>Uplo</VAR> is <CODE>CblasLower</CODE> then the lower triangle
of <VAR>A</VAR> is used.  If <VAR>Diag</VAR> is <CODE>CblasNonUnit</CODE> then the
diagonal of <VAR>A</VAR> is used, but if <VAR>Diag</VAR> is <CODE>CblasUnit</CODE> then
the diagonal elements of the matrix <VAR>A</VAR> are taken as unity and are
not referenced.
</DL>

</P>
<P>
<DL>
<DT><U>Function:</U> int <B>gsl_blas_ssyrk</B> <I>(CBLAS_UPLO_t <VAR>Uplo</VAR>, CBLAS_TRANSPOSE_t <VAR>Trans</VAR>, float <VAR>alpha</VAR>, const gsl_matrix_float * <VAR>A</VAR>, float <VAR>beta</VAR>, gsl_matrix_float * <VAR>C</VAR>)</I>
<DD><A NAME="IDX1157"></A>
<DT><U>Function:</U> int <B>gsl_blas_dsyrk</B> <I>(CBLAS_UPLO_t <VAR>Uplo</VAR>, CBLAS_TRANSPOSE_t <VAR>Trans</VAR>, double <VAR>alpha</VAR>, const gsl_matrix * <VAR>A</VAR>, double <VAR>beta</VAR>, gsl_matrix * <VAR>C</VAR>)</I>
<DD><A NAME="IDX1158"></A>
<DT><U>Function:</U> int <B>gsl_blas_csyrk</B> <I>(CBLAS_UPLO_t <VAR>Uplo</VAR>, CBLAS_TRANSPOSE_t <VAR>Trans</VAR>, const gsl_complex_float <VAR>alpha</VAR>, const gsl_matrix_complex_float * <VAR>A</VAR>, const gsl_complex_float <VAR>beta</VAR>, gsl_matrix_complex_float * <VAR>C</VAR>)</I>
<DD><A NAME="IDX1159"></A>
<DT><U>Function:</U> int <B>gsl_blas_zsyrk</B> <I>(CBLAS_UPLO_t <VAR>Uplo</VAR>, CBLAS_TRANSPOSE_t <VAR>Trans</VAR>, const gsl_complex <VAR>alpha</VAR>, const gsl_matrix_complex * <VAR>A</VAR>, const gsl_complex <VAR>beta</VAR>, gsl_matrix_complex * <VAR>C</VAR>)</I>
<DD><A NAME="IDX1160"></A>
<A NAME="IDX1161"></A>
These functions compute a rank-k update of the symmetric matrix <VAR>C</VAR>,
C = \alpha A A^T + \beta C when <VAR>Trans</VAR> is
<CODE>CblasNoTrans</CODE> and C = \alpha A^T A + \beta C when
<VAR>Trans</VAR> is <CODE>CblasTrans</CODE>.  Since the matrix <VAR>C</VAR> is symmetric
only its upper half or lower half need to be stored.  When <VAR>Uplo</VAR> is
<CODE>CblasUpper</CODE> then the upper triangle and diagonal of <VAR>C</VAR> are
used, and when <VAR>Uplo</VAR> is <CODE>CblasLower</CODE> then the lower triangle
and diagonal of <VAR>C</VAR> are used.
</DL>

</P>
<P>
<DL>
<DT><U>Function:</U> int <B>gsl_blas_cherk</B> <I>(CBLAS_UPLO_t <VAR>Uplo</VAR>, CBLAS_TRANSPOSE_t <VAR>Trans</VAR>, float <VAR>alpha</VAR>, const gsl_matrix_complex_float * <VAR>A</VAR>, float <VAR>beta</VAR>, gsl_matrix_complex_float * <VAR>C</VAR>)</I>
<DD><A NAME="IDX1162"></A>
<DT><U>Function:</U> int <B>gsl_blas_zherk</B> <I>(CBLAS_UPLO_t <VAR>Uplo</VAR>, CBLAS_TRANSPOSE_t <VAR>Trans</VAR>, double <VAR>alpha</VAR>, const gsl_matrix_complex * <VAR>A</VAR>, double <VAR>beta</VAR>, gsl_matrix_complex * <VAR>C</VAR>)</I>
<DD><A NAME="IDX1163"></A>
<A NAME="IDX1164"></A>
These functions compute a rank-k update of the hermitian matrix <VAR>C</VAR>,
C = \alpha A A^H + \beta C when <VAR>Trans</VAR> is
<CODE>CblasNoTrans</CODE> and C = \alpha A^H A + \beta C when
<VAR>Trans</VAR> is <CODE>CblasTrans</CODE>.  Since the matrix <VAR>C</VAR> is hermitian
only its upper half or lower half need to be stored.  When <VAR>Uplo</VAR> is
<CODE>CblasUpper</CODE> then the upper triangle and diagonal of <VAR>C</VAR> are
used, and when <VAR>Uplo</VAR> is <CODE>CblasLower</CODE> then the lower triangle
and diagonal of <VAR>C</VAR> are used.  The imaginary elements of the
diagonal are automatically set to zero.
</DL>

</P>
<P>
<DL>
<DT><U>Function:</U> int <B>gsl_blas_ssyr2k</B> <I>(CBLAS_UPLO_t <VAR>Uplo</VAR>, CBLAS_TRANSPOSE_t <VAR>Trans</VAR>, float <VAR>alpha</VAR>, const gsl_matrix_float * <VAR>A</VAR>, const gsl_matrix_float * <VAR>B</VAR>, float <VAR>beta</VAR>, gsl_matrix_float * <VAR>C</VAR>)</I>
<DD><A NAME="IDX1165"></A>
<DT><U>Function:</U> int <B>gsl_blas_dsyr2k</B> <I>(CBLAS_UPLO_t <VAR>Uplo</VAR>, CBLAS_TRANSPOSE_t <VAR>Trans</VAR>, double <VAR>alpha</VAR>, const gsl_matrix * <VAR>A</VAR>, const gsl_matrix * <VAR>B</VAR>, double <VAR>beta</VAR>, gsl_matrix * <VAR>C</VAR>)</I>
<DD><A NAME="IDX1166"></A>
<DT><U>Function:</U> int <B>gsl_blas_csyr2k</B> <I>(CBLAS_UPLO_t <VAR>Uplo</VAR>, CBLAS_TRANSPOSE_t <VAR>Trans</VAR>, const gsl_complex_float <VAR>alpha</VAR>, const gsl_matrix_complex_float * <VAR>A</VAR>, const gsl_matrix_complex_float * <VAR>B</VAR>, const gsl_complex_float <VAR>beta</VAR>, gsl_matrix_complex_float * <VAR>C</VAR>)</I>
<DD><A NAME="IDX1167"></A>
<DT><U>Function:</U> int <B>gsl_blas_zsyr2k</B> <I>(CBLAS_UPLO_t <VAR>Uplo</VAR>, CBLAS_TRANSPOSE_t <VAR>Trans</VAR>, const gsl_complex <VAR>alpha</VAR>, const gsl_matrix_complex * <VAR>A</VAR>, const gsl_matrix_complex * <VAR>B</VAR>, const gsl_complex <VAR>beta</VAR>, gsl_matrix_complex * <VAR>C</VAR>)</I>
<DD><A NAME="IDX1168"></A>
<A NAME="IDX1169"></A>
These functions compute a rank-2k update of the symmetric matrix <VAR>C</VAR>,
C = \alpha A B^T + \alpha B A^T + \beta C when <VAR>Trans</VAR> is
<CODE>CblasNoTrans</CODE> and C = \alpha A^T B + \alpha B^T A + \beta C when
<VAR>Trans</VAR> is <CODE>CblasTrans</CODE>.  Since the matrix <VAR>C</VAR> is symmetric
only its upper half or lower half need to be stored.  When <VAR>Uplo</VAR> is
<CODE>CblasUpper</CODE> then the upper triangle and diagonal of <VAR>C</VAR> are
used, and when <VAR>Uplo</VAR> is <CODE>CblasLower</CODE> then the lower triangle
and diagonal of <VAR>C</VAR> are used.
</DL>

</P>
<P>
<DL>
<DT><U>Function:</U> int <B>gsl_blas_cher2k</B> <I>(CBLAS_UPLO_t <VAR>Uplo</VAR>, CBLAS_TRANSPOSE_t <VAR>Trans</VAR>, const gsl_complex_float <VAR>alpha</VAR>, const gsl_matrix_complex_float * <VAR>A</VAR>, const gsl_matrix_complex_float * <VAR>B</VAR>, float <VAR>beta</VAR>, gsl_matrix_complex_float * <VAR>C</VAR>)</I>
<DD><A NAME="IDX1170"></A>
<DT><U>Function:</U> int <B>gsl_blas_zher2k</B> <I>(CBLAS_UPLO_t <VAR>Uplo</VAR>, CBLAS_TRANSPOSE_t <VAR>Trans</VAR>, const gsl_complex <VAR>alpha</VAR>, const gsl_matrix_complex * <VAR>A</VAR>, const gsl_matrix_complex * <VAR>B</VAR>, double <VAR>beta</VAR>, gsl_matrix_complex * <VAR>C</VAR>)</I>
<DD><A NAME="IDX1171"></A>
<A NAME="IDX1172"></A>
These functions compute a rank-2k update of the hermitian matrix <VAR>C</VAR>,
C = \alpha A B^H + \alpha^* B A^H + \beta C when <VAR>Trans</VAR> is
<CODE>CblasNoTrans</CODE> and C = \alpha A^H B + \alpha^* B^H A + \beta C when
<VAR>Trans</VAR> is <CODE>CblasConjTrans</CODE>.  Since the matrix <VAR>C</VAR> is hermitian
only its upper half or lower half need to be stored.  When <VAR>Uplo</VAR> is
<CODE>CblasUpper</CODE> then the upper triangle and diagonal of <VAR>C</VAR> are
used, and when <VAR>Uplo</VAR> is <CODE>CblasLower</CODE> then the lower triangle
and diagonal of <VAR>C</VAR> are used.  The imaginary elements of the
diagonal are automatically set to zero.
</DL>

</P>


<H2><A NAME="SEC220" HREF="gsl-ref_toc.html#TOC220">Examples</A></H2>

<P>
The following program computes the product of two matrices using the
Level-3 BLAS function DGEMM,

</P>

<PRE>
[ 0.11 0.12 0.13 ]  [ 1011 1012 ]     [ 367.76 368.12 ]
[ 0.21 0.22 0.23 ]  [ 1021 1022 ]  =  [ 674.06 674.72 ]
                    [ 1031 1032 ]
</PRE>

<P>
The matrices are stored in row major order, according to the C convention 
for arrays.

</P>

<PRE>
#include &#60;stdio.h&#62;
#include &#60;gsl/gsl_blas.h&#62;

int
main (void)
{
  double a[] = { 0.11, 0.12, 0.13,
                 0.21, 0.22, 0.23 };

  double b[] = { 1011, 1012,
                 1021, 1022,
                 1031, 1032 };

  double c[] = { 0.00, 0.00,
                 0.00, 0.00 };

  gsl_matrix_view A = gsl_matrix_view_array(a, 2, 3);
  gsl_matrix_view B = gsl_matrix_view_array(b, 3, 2);
  gsl_matrix_view C = gsl_matrix_view_array(c, 2, 2);

  /* Compute C = A B */

  gsl_blas_dgemm (CblasNoTrans, CblasNoTrans,
                  1.0, &#38;A.matrix, &#38;B.matrix,
                  0.0, &#38;C.matrix);

  printf ("[ %g, %g\n", c[0], c[1]);
  printf ("  %g, %g ]\n", c[2], c[3]);

  return 0;  
}
</PRE>

<P>
Here is the output from the program,

</P>

<PRE>
$ ./a.out
[ 367.76, 368.12
  674.06, 674.72 ]</PRE>



<H2><A NAME="SEC221" HREF="gsl-ref_toc.html#TOC221">References and Further Reading</A></H2>

<P>
Information on the BLAS standards, including both the legacy and
draft interface standards, is available online from the BLAS
Homepage and BLAS Technical Forum web-site.

</P>

<UL>
<LI>

<CITE>BLAS Homepage</CITE> <BR>
<A HREF="http://www.netlib.org/blas/"><TT>http://www.netlib.org/blas/</TT></A>
<LI>

<CITE>BLAS Technical Forum</CITE> <BR>
<A HREF="http://www.netlib.org/cgi-bin/checkout/blast/blast.pl"><TT>http://www.netlib.org/cgi-bin/checkout/blast/blast.pl</TT></A>
</UL>

<P>
The following papers contain the specifications for Level 1, Level 2 and
Level 3 BLAS.

</P>

<UL>
<LI>

C. Lawson, R. Hanson, D. Kincaid, F. Krogh, "Basic Linear Algebra
Subprograms for Fortran Usage", <CITE>ACM Transactions on Mathematical
Software</CITE>, Vol. 5 (1979), Pages 308--325.

<LI>

J.J. Dongarra, J. DuCroz, S. Hammarling, R. Hanson, "An Extended Set of
Fortran Basic Linear Algebra Subprograms", <CITE>ACM Transactions on
Mathematical Software</CITE>, Vol. 14, No. 1 (1988), Pages 1--32.

<LI>

J.J. Dongarra, I. Duff, J. DuCroz, S. Hammarling, "A Set of
Level 3 Basic Linear Algebra Subprograms", <CITE>ACM Transactions on
Mathematical Software</CITE>, Vol. 16 (1990), Pages 1--28.
</UL>

<P>
Postscript versions of the latter two papers are available from
<A HREF="http://www.netlib.org/blas/"><TT>http://www.netlib.org/blas/</TT></A>. A CBLAS wrapper for Fortran BLAS
libraries is available from the same location.

</P>
<P><HR><P>
<p>Go to the <A HREF="gsl-ref_1.html">first</A>, <A HREF="gsl-ref_11.html">previous</A>, <A HREF="gsl-ref_13.html">next</A>, <A HREF="gsl-ref_50.html">last</A> section, <A HREF="gsl-ref_toc.html">table of contents</A>.
</BODY>
</HTML>