Changeset 62 for tests/test-ftrsm.C

Show
Ignore:
Timestamp:
06/03/08 21:24:57 (7 months ago)
Author:
pernet
Message:

* Change the design of fflas-bounds
* Modular<double> -> ModularBalanced?<double>
* Fix the winograd recursion issue (when some steps are done over the field)
* Fix a bunch of bugs
* Remove the template specialization by the Element (incompatible with the soon coming compressed representations over small fields)
* Create a randiter file, generic wrt the modular field

Location:
tests
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • tests

    • Property svn:ignore set to
      test-invert
      test-det
      dense_generator
      test-frobenius
      Makefile
      test-charpoly
      test-lqup
      test-fgemm
      test-fgemv
      test-ftrsm
      test-rank
  • tests/test-ftrsm.C

    r43 r62  
    11/* -*- mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ 
    22//-------------------------------------------------------------------------- 
    3 //                        Test for ftrtri : 1 computation 
     3//                        Test for ftrsm : 1 computation 
    44//                   
    55//-------------------------------------------------------------------------- 
     
    2020using namespace std; 
    2121 
    22 typedef Modular<double> Field; 
     22//typedef ModularBalanced<double> Field; 
     23typedef ModularBalanced<float> Field; 
    2324 
    2425int main(int argc, char** argv){ 
     
    3435        } 
    3536        int nbit=atoi(argv[4]); // number of times the product is performed 
    36         Field F(atoi(argv[1])); 
     37        Field F(atof(argv[1])); 
    3738        F.init(zero,0.0); 
    3839        F.init(one,1.0); 
     
    9798                //write_field (F,cerr<<"B2="<<endl,B2,m,n,n); 
    9899                //write_field (F,cerr<<"B="<<endl,B,m,n,n); 
    99         }else{ 
    100          
     100        } else   
    101101                cerr<<"PASS"<<endl; 
    102         } 
    103  
    104         Field::Element * C = read_field (F, argv[2], &k, &k); 
    105         wrong = false; 
    106  
    107         for (int i=0;i<k;++i) 
    108                 for (int j=0;j<k;++j) 
    109                         if ( !F.areEqual(*(A+i*k+j), *(C+i*k+j))){ 
    110                                 cerr<<"A ["<<i<<", "<<j<<"] = "<<(*(A+i*k+j)) 
    111                                     <<" ; C ["<<i<<", "<<j<<"] = "<<(*(C+i*k+j)) 
    112                                     <<endl; 
    113                                 wrong = true; 
    114                         } 
    115          
    116         delete[] C; 
    117                  
    118         if ( wrong ){ 
    119                 cerr<<"FAIL A modifed"<<endl; 
    120                 //write_field (F,cerr<<"B2="<<endl,B2,m,n,n); 
    121                 //write_field (F,cerr<<"B="<<endl,B,m,n,n); 
    122         }else{ 
    123          
    124                 cerr<<"PASS"<<endl; 
    125         } 
    126          
    127102#endif 
    128103 
     
    130105        delete[] B; 
    131106        delete[] B2; 
     107 
    132108#if TIME 
    133109        double mflops = m*n/1000000.0*nbit*n/time;