#include "trace.h" #include "common.h" #include #include #include void panel(double *P, int k, info_type info){ int m, ld, err, np, i; i = k*info.B; np = info.B; m = info.N-i; ld = info.N; #if defined(DBG) printf("%2d -- panel : %d\n",omp_get_thread_num(),k); #endif trace_event_start(PNL); dgetrf_(&m, &np, P+i, &ld, info.ipiv+i, &err); trace_event_stop(PNL); } void update(double *P, double *U, int k, int j, info_type info){ int m, mu, nu, np, ld, err, i; char NoTran = 'N', Lower='L', Unit='U', Left='L'; int IONE=1, IMONE=-1, IZERO=0; double DONE=(double)1.0, DMONE=-1.0, DZERO=0.0; i = k*info.B; np = info.B; nu = info.B; m = info.N-i; mu = m-np; ld = info.N; #if defined(DBG) printf("%2d -- update: %d %d\n",omp_get_thread_num(),k,j); #endif trace_event_start(UPD); dlaswp_(&nu, U+i, &ld, &IONE, &np, info.ipiv+i, &IONE); dtrsm_ (&Left, &Lower, &NoTran, &Unit, &np, &nu, &DONE, P+i, &ld, U+i, &ld); dgemm_ (&NoTran, &NoTran, &mu, &nu, &np, &DMONE, P+i+np, &ld, U+i, &ld, &DONE, U+i+np, &ld); trace_event_stop(UPD); return; } void backperm(Matrix A, info_type info){ int i, j, ld, ipb, ipo; int IONE=1; ld = info.N; trace_event_start(END); for(i=info.B; i