/* * This file is part of MXE. See LICENSE.md for licensing information. */ /* taken from https://www.netlib.org/lapack/lapacke.html */ /* Calling CGEQRF and CUNGQR to compute Q with workspace querying */ #include #include #include #include int main (int argc, const char * argv[]) { (void)argc; (void)argv; lapack_complex_float *a,*tau,*r,*work,one,zero,query; lapack_int info,m,n,lda,lwork; int i,j; float err; m = 10; n = 5; lda = m; one = lapack_make_complex_float(1.0,0.0); zero= lapack_make_complex_float(0.0,0.0); a = calloc(m*n,sizeof(lapack_complex_float)); r = calloc(n*n,sizeof(lapack_complex_float)); tau = calloc(m,sizeof(lapack_complex_float)); for(j=0;j