- Timestamp:
- 04/09/07 12:02:27 (2 years ago)
- Location:
- tests
- Files:
-
- 2 modified
-
Makefile (modified) (2 diffs)
-
test-lqup.C (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tests/Makefile
r4 r14 4 4 # root for the blas library, for ex. /home/foo/ATLAS/lib/Linux_P4SSE2 5 5 #BLASROOT = /home/cpernet/Logiciels/ATLAS_Opteron64/lib/ 6 BLASROOT = /home/ pernet/Logiciels/ATLAS/lib/Linux_PIIISSE26 BLASROOT = /home/cpernet/Logiciels/GotoBLAS 7 7 8 8 # ATLAS BLAS users : uncomment these lines: 9 CXXFLAGS+=-D__LINBOX_HAVE_CBLAS10 LOADLIBES+=-L${BLASROOT} -lcblas -latlas9 #CXXFLAGS+=-D__LINBOX_HAVE_CBLAS 10 #LOADLIBES+=-L${BLASROOT} -lcblas -latlas 11 11 12 12 # GotoBlas BLAS users : uncomment this line 13 #LOADLIBES+=-L${BLASROOT} -lgoto13 LOADLIBES+=-L${BLASROOT} -lgoto 14 14 15 15 # Other BLAS users, uncomment this line … … 17 17 18 18 # architecture parameter for gcc (-march option) for ex. pentium4, athlon ... 19 ARCH = -march=pentium319 #ARCH = -march=pentium3 20 20 #ARCH = -march=pentium4 21 21 #ARCH = -march=athlon 22 22 #ARCH = -march=opteron 23 ARCH = -march=opteron -m64 -mtune=k8 23 24 24 25 #---------------------------------------------------------- -
tests/test-lqup.C
r4 r14 20 20 #include "Matio.h" 21 21 #include "timer.h" 22 #include "fflas-ffpack/modular- balanced.h"22 #include "fflas-ffpack/modular-positive.h" 23 23 #include "fflas-ffpack/ffpack.h" 24 24 … … 36 36 exit(-1); 37 37 } 38 Field F( atoi(argv[1]));38 Field F((unsigned long)atoi(argv[1])); 39 39 Field::Element * A; 40 40 … … 63 63 tim.clear(); 64 64 tim.start(); 65 R = FFPACK::LUdivine (F, diag, m, n, A, n, P, Q,66 FFPACK::FfpackLQUP, cutoff);65 R = FFPACK::LUdivine_gauss (F, diag, m, n, A, n, P, Q, 66 FFPACK::FfpackLQUP); 67 67 tim.stop(); 68 68 timc+=tim; 69 69 } 70 70 //write_field (F,cerr<<"Result = "<<endl, A, m,n,n); 71 71 72 // cerr<<"P = ["; 73 // for (size_t i=0; i<n; ++i) 74 // cerr<<P[i]<<" "; 75 // cerr<<"]"<<endl; 76 // cerr<<"Q = ["; 77 // for (size_t i=0; i<m; ++i) 78 // cerr<<Q[i]<<" "; 79 // cerr<<"]"<<endl; 72 80 #if DEBUG 73 81 Field::Element * L = new Field::Element[m*m]; … … 84 92 F.assign (*(U + i*n + j), *(A+ i*n+j)); 85 93 } 94 for (size_t i=R;i<m; ++i) 95 for (size_t j=0; j<n; ++j) 96 F.assign(*(U+i*n+j), zero); 86 97 for ( int i=0; i<m; ++i ){ 87 98 int j=0; 88 for (; j< ((i< n)?i:n) ; ++j )99 for (; j< ((i<R)?i:R) ; ++j ) 89 100 F.assign( *(L + i*m+j), *(A+i*n+j)); 90 101 for (; j<m; ++j ) … … 92 103 } 93 104 94 FFPACK::applyP( F, FFLAS::FflasRight, FFLAS::FflasNoTrans, m,0,m, L, m, Q); 105 // write_field(F,cerr<<"L = "<<endl,L,m,m,m); 106 // write_field(F,cerr<<"U = "<<endl,U,m,n,n); 107 FFPACK::applyP( F, FFLAS::FflasRight, FFLAS::FflasNoTrans, m,0,R, L, m, Q); 95 108 if (diag == FFLAS::FflasNonUnit) 96 109 for ( int i=0; i<m; ++i )
