Show
Ignore:
Timestamp:
04/04/11 14:15:18 (13 years ago)
Author:
smidl
Message:

Carlson fast with C + test

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • applications/pmsm/simulator_zdenek/test_Ch.cpp

    r1241 r1321  
    2727                int PSICh[25]={0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0}; 
    2828                int Chf[25]={0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0}; 
     29                int Cf[10]={0,0,0,0,0, 0,0,0,0,0}; 
    2930                int multip=1<<15; 
    3031                 
     
    129130        vec b; 
    130131        mat C = zeros(2,5); 
    131         C(0,0)=1.0;C(1,1)=1.0; 
     132        C(0,0)=.2;C(1,1)=0.4;C(0,1)=0.3; 
     133         
    132134        for (int iy=0; iy<2; iy++){ 
    133135                a     = U.T()*C.get_row(iy);    // a is not modified, but  
     
    160162         
    161163        Ch = U*diag(sqrt(D)); 
     164        mat_to_int16(round_i(C*multip),Cf);              
    162165 
    163166        cout << "bef Carlson: " << imat(Chf,5,5) << endl; 
    164          
    165         carlson(difz,xf, Chf, Rf, 2, 5); 
     167 
     168        carlson_fastC(difz,xf, Chf, Cf,Rf, 2, 5); 
    166169         
    167170        cout << endl<<"after Carlson" <<endl;