Changeset 62 for tests/testeur_fgemm.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/testeur_fgemm.C

    r25 r62  
    1212#include <iomanip> 
    1313using namespace std; 
    14 //#include "fflas-ffpack/modular-int.h" 
    15 #include "fflas-ffpack/modular-balanced.h" 
     14#include "fflas-ffpack/modular-int.h" 
     15//#include "fflas-ffpack/modular-balanced.h" 
    1616#include "timer.h" 
    1717#include "Matio.h" 
     
    2121 
    2222 
    23 typedef Modular<double> Field; 
     23//typedef ModularBalanced<float> Field; 
     24typedef ModularBalanced<double> Field; 
     25//typedef Modular<double> Field; 
     26//typedef Modular<float> Field; 
    2427//typedef Modular<int> Field; 
    25 //typedef Modular<float> Field; 
    2628//typedef GivaroZpz<Std32> Field; 
    2729//typedef GivaroGfq Field; 
     
    3133        IntPrimeDom IPD; 
    3234        Field::Element alpha, beta; 
    33         int p; 
     35        long p; 
    3436        size_t M, K, N, Wino; 
    3537        bool keepon = true; 
     
    126128//                                      keepon = false; 
    127129//              } 
    128                 Field::Element aij, bij, boa; 
    129                 F.div(boa, beta, alpha); 
     130                Field::Element aij, bij, boa, temp; 
     131                //F.div(boa, beta, alpha); 
    130132                for (int i = 0; i < M; ++i ) 
    131133                        for ( int j = 0; j < N; ++j ){ 
    132                                 F.mulin(*(Cbis+i*N+j),boa); 
     134                                //                              F.mulin(*(Cbis+i*N+j),boa); 
     135                                F.mulin(*(Cbis+i*N+j),beta); 
    133136                                for ( int l = 0; l < K ; ++l ){ 
    134137                                        if ( ta == FFLAS::FflasNoTrans ) 
     
    140143                                        else 
    141144                                                bij = *(B+j*ldb+l); 
    142                                          
    143                                         F.axpyin( *(Cbis+i*N+j), aij, bij ); 
     145                                        F.mul(temp,aij,bij); 
     146                                        F.axpyin( *(Cbis+i*N+j), alpha, temp); 
     147                                        //F.axpyin( *(Cbis+i*N+j), aij, bij ); 
    144148                                } 
    145                                 F.mulin( *(Cbis+i*N+j),alpha ); 
     149                                //F.mulin( *(Cbis+i*N+j),alpha ); 
    146150                                if ( !F.areEqual( *(Cbis+i*N+j), *(C+i*N+j) ) ) { 
    147151                                        cerr<<"error for i,j="<<i<<" "<<j<<" "<<*(C+i*N+j)<<" "<<*(Cbis+i*N+j)<<endl; 
     
    160164                } 
    161165                else{ 
    162                         cerr<<"C="<<endl; 
    163                         write_field( F, cerr, C, M, N, N ); 
    164                         cerr<<"Cbis="<<endl; 
    165                         write_field( F, cerr, Cbis, M, N, N ); 
     166                        // cerr<<"C="<<endl; 
     167//                      write_field( F, cerr, C, M, N, N ); 
     168//                      cerr<<"Cbis="<<endl; 
     169//                      write_field( F, cerr, Cbis, M, N, N ); 
    166170                } 
    167171        }