LAPACK  3.10.0 LAPACK: Linear Algebra PACKage

## ◆ main()

 int main ( int argc, const char * argv[] )

Definition at line 64 of file example_DGELS_rowmajor.c.

65 {
66  /* Locals */
67  double A[5][3] = {1,1,1,2,3,4,3,5,2,4,2,5,5,4,3};
68  double b[5][2] = {-10,-3,12,14,14,12,16,16,18,16};
69  lapack_int info,m,n,lda,ldb,nrhs;
70
71  /* Initialization */
72  m = 5;
73  n = 3;
74  nrhs = 2;
75  lda = 3;
76  ldb = 2;
77
78  /* Print Entry Matrix */
79  print_matrix_rowmajor( "Entry Matrix A", m, n, *A, lda );
80  /* Print Right Rand Side */
81  print_matrix_rowmajor( "Right Hand Side b", n, nrhs, *b, ldb );
82  printf( "\n" );
83
84  /* Executable statements */
85  printf( "LAPACKE_dgels (row-major, high-level) Example Program Results\n" );
86  /* Solve least squares problem*/
87  info = LAPACKE_dgels(LAPACK_ROW_MAJOR,'N',m,n,nrhs,*A,lda,*b,ldb);
88
89  /* Print Solution */
90  print_matrix_rowmajor( "Solution", n, nrhs, *b, ldb );
91  printf( "\n" );
92  exit( 0 );
93 } /* End of LAPACKE_dgels Example */
#define lapack_int
Definition: lapack.h:83
lapack_int LAPACKE_dgels(int matrix_layout, char trans, lapack_int m, lapack_int n, lapack_int nrhs, double *a, lapack_int lda, double *b, lapack_int ldb)
Definition: lapacke_dgels.c:35
#define LAPACK_ROW_MAJOR
Definition: lapacke.h:52
void print_matrix_rowmajor(char *desc, lapack_int m, lapack_int n, double *mat, lapack_int ldm)
Here is the call graph for this function: