Added script front-end for primer-design code
[htsworkflow.git] / htswanalysis / MACS / lib / gsl / gsl-1.11 / doc / examples / cblas.c
1 #include <stdio.h>
2 #include <gsl/gsl_cblas.h>
3
4 int
5 main (void)
6 {
7   int lda = 3;
8
9   float A[] = { 0.11, 0.12, 0.13,
10                 0.21, 0.22, 0.23 };
11
12   int ldb = 2;
13   
14   float B[] = { 1011, 1012,
15                 1021, 1022,
16                 1031, 1032 };
17
18   int ldc = 2;
19
20   float C[] = { 0.00, 0.00,
21                 0.00, 0.00 };
22
23   /* Compute C = A B */
24
25   cblas_sgemm (CblasRowMajor, 
26                CblasNoTrans, CblasNoTrans, 2, 2, 3,
27                1.0, A, lda, B, ldb, 0.0, C, ldc);
28
29   printf ("[ %g, %g\n", C[0], C[1]);
30   printf ("  %g, %g ]\n", C[2], C[3]);
31
32   return 0;  
33 }