LAPACK  3.8.0 LAPACK: Linear Algebra PACKage

## ◆ main()

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

Definition at line 66 of file example_DGELS_rowmajor.c.

67 {
68  /* Locals */
69  double A[5][3] = {1,1,1,2,3,4,3,5,2,4,2,5,5,4,3};
70  double b[5][2] = {-10,-3,12,14,14,12,16,16,18,16};
71  lapack_int info,m,n,lda,ldb,nrhs;
72
73  /* Initialization */
74  m = 5;
75  n = 3;
76  nrhs = 2;
77  lda = 3;
78  ldb = 2;
79
80  /* Print Entry Matrix */
81  print_matrix_rowmajor( "Entry Matrix A", m, n, *A, lda );
82  /* Print Right Rand Side */
83  print_matrix_rowmajor( "Right Hand Side b", n, nrhs, *b, ldb );
84  printf( "\n" );
85
86  /* Executable statements */
87  printf( "LAPACKE_dgels (row-major, high-level) Example Program Results\n" );
88  /* Solve least squares problem*/
89  info = LAPACKE_dgels(LAPACK_ROW_MAJOR,'N',m,n,nrhs,*A,lda,*b,ldb);
90
91  /* Print Solution */
92  print_matrix_rowmajor( "Solution", n, nrhs, *b, ldb );
93  printf( "\n" );
94  exit( 0 );
95 } /* End of LAPACKE_dgels Example */
#define LAPACK_ROW_MAJOR
Definition: lapacke.h:119
#define lapack_int
Definition: lapacke.h:47
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:36
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: