LCOV - code coverage report
Current view: top level - synthesis/TransformMachines2 - accumulateToGrid.inc (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 31 31 100.0 %
Date: 2024-12-11 20:54:31 Functions: 0 0 -

          Line data    Source code
       1             : // -*- C++ -*-
       2             : //
       3             : // File to include to get the inner gridding loops without a function call
       4             : //
       5             : //--------------------------------------------------------------------------------
       6             :   {
       7             :     Int iLoc[2];
       8             :     Bool Dummy;
       9     6501368 :     Complex wt;
      10             : 
      11     6501368 :     Vector<Int> iCFPos(4,0);
      12     6501368 :     const Int * __restrict__ gridInc_p_ptr= gridInc_p.getStorage(Dummy);
      13     6501368 :     const Int * __restrict__ iGrdPosPtr = igrdpos.getStorage(Dummy);
      14     6501368 :     T* __restrict__ gridStore = grid.getStorage(Dummy);
      15             : 
      16     6501368 :     const Int* scaledSupport_ptr=support.getStorage(Dummy);
      17     6501368 :     const Float *scaledSampling_ptr=sampling.getStorage(Dummy);
      18     6501368 :     const Double *off_ptr=off.getStorage(Dummy);
      19     6501368 :     const Int *loc_ptr = loc.getStorage(Dummy);
      20     6501368 :     Int *iCFPos_ptr = iCFPos.getStorage(Dummy);
      21     6501368 :     const Int* convOrigin_ptr=convOrigin.getStorage(Dummy);
      22     6501368 :     Int *igrdpos_ptr=igrdpos.getStorage(Dummy);
      23     6501368 :     Int *cfInc_p_ptr = cfInc_p.getStorage(Dummy);
      24             :     
      25             :     Int phaseGradOrigin_l[2];
      26     6501368 :     phaseGradOrigin_l[0] = cached_phaseGrad_p.shape()(0)/2;
      27     6501368 :     phaseGradOrigin_l[1] = cached_phaseGrad_p.shape()(0)/2;
      28             :    
      29             : 
      30   132897032 :     for(Int iy=-scaledSupport_ptr[1]; iy <= scaledSupport_ptr[1]; iy++) 
      31             :       {
      32             :         //      iloc_ptr[1]=SynthesisUtils::nint((scaledSampling_ptr[1]*iy+off_ptr[1])-1);
      33   126395664 :         iLoc[1]=(Int)((scaledSampling_ptr[1]*iy+off_ptr[1]));
      34   126395664 :         igrdpos_ptr[1]=loc_ptr[1]+iy;
      35   126395664 :         iCFPos_ptr[1] =iLoc[1]+convOrigin_ptr[1];
      36             : 
      37  2841834056 :         for(Int ix=-scaledSupport_ptr[0]; ix <= scaledSupport_ptr[0]; ix++) 
      38             :           {
      39             :             //      iloc_ptr[0]=SynthesisUtils::nint((scaledSampling_ptr[0]*ix+off_ptr[0])-1);
      40  2715438392 :             iLoc[0]=(Int)((scaledSampling_ptr[0]*ix+off_ptr[0]));
      41  2715438392 :             igrdpos_ptr[0]=loc_ptr[0]+ix;
      42  2715438392 :             iCFPos_ptr[0] =iLoc[0]+convOrigin_ptr[0];
      43  2715438392 :             wt = getFrom4DArray((const Complex * __restrict__ &)convFuncV, 
      44             :                                 iCFPos_ptr,cfInc_p_ptr);//cfArea;
      45  2715438392 :             if (dataWVal > 0.0) {wt = conj(wt);}
      46  2715438392 :             norm += (wt);
      47  2715438392 :             if (finitePointingOffsets)
      48             :               {
      49  1020412066 :                 wt *= cached_phaseGrad_p(iLoc[0]+phaseGradOrigin_l[0],
      50  1020412066 :                                          iLoc[1]+phaseGradOrigin_l[1]);
      51             :               }
      52  2715438392 :             addTo4DArray_ptr(gridStore,iGrdPosPtr,gridInc_p_ptr, nvalue,wt);
      53             :           }
      54             :       }
      55     6501368 :   }

Generated by: LCOV version 1.16