1 #include <assert.h>
2 #include <stdint.h>
3 #include <string.h>
4 
5 #if BLA_SIZEOF_INTEGER == 4
6 typedef int32_t blas_int;
7 #elif BLA_SIZEOF_INTEGER == 8
8 typedef int64_t blas_int;
9 #else
10 #  error BLA_SIZEOF_INTEGER is not declared!
11 #endif
12 
13 // declare what parts of the lapack C-API we need
14 void dgesv_(blas_int*, blas_int*, double*, blas_int*, blas_int*, double*,
15             blas_int*, blas_int*);
16 
main()17 int main()
18 {
19   double A[8] = {
20     0, 1, 2, 3, 4, 5, 6, 7,
21   };
22   double B[2] = { 0, 5 };
23   blas_int ipiv[2] = { 0, 0 };
24   blas_int info = 0;
25 
26   blas_int dim = 2;
27   blas_int numCols = 1;
28   dgesv_(&dim, &numCols, A, &dim, ipiv, B, &dim, &info);
29   return 0;
30 }
31