/* This code snippet demonstrates how to use LAPACK to form a QR decomposition of the matrix A. Note the input matrix A is in column-major ordering as are the output matrices R and Q. */ memcpy(Q,A,sizeof(double)*N*N); LAPACKE_dgeqrfp(LAPACK_COL_MAJOR,N,N,Q[0],N,TAU); for(int i=0;i