LCOV - code coverage report
Current view: top level - synthesis/TransformMachines2 - accumulateFromGrid.inc (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 0 31 0.0 %
Date: 2024-10-04 16:51:10 Functions: 0 0 -

          Line data    Source code
       1             : // -*- C++ -*-
       2             : //
       3             : // File to include to have the inner loops for de-gridding
       4             : // (prediction) without a function call.
       5             : //
       6             : //--------------------------------------------------------------------------------
       7             : {
       8           0 :   Vector<Int> iCFPos(4,0);
       9             :   Int iLoc[2];
      10             :   Bool Dummy;
      11           0 :   Complex wt;
      12             : 
      13           0 :   const Int * __restrict__ gridInc_p_ptr = gridInc_p.getStorage(Dummy);
      14           0 :   const Complex * __restrict__ gridStore = grid.getStorage(Dummy);
      15           0 :   const Int* support_ptr    = support.getStorage(Dummy);
      16           0 :   const Float *sampling_ptr = sampling.getStorage(Dummy);
      17           0 :   const Double *off_ptr           = off.getStorage(Dummy);
      18           0 :   const Int* convOrigin_ptr       = convOrigin.getStorage(Dummy);
      19           0 :   const Int *loc_ptr = loc.getStorage(Dummy);
      20             : 
      21           0 :   Int * __restrict__       igrdpos_ptr   = igrdpos.getStorage(Dummy);
      22           0 :   Int *iCFPos_ptr                 = iCFPos.getStorage(Dummy);
      23           0 :   Int *cfInc_p_ptr                = cfInc_p.getStorage(Dummy);
      24             :   Int phaseGradOrigin_l[2]; 
      25             :   
      26           0 :   phaseGradOrigin_l[0] = cached_phaseGrad_p.shape()(0)/2 ;
      27           0 :   phaseGradOrigin_l[1] = cached_phaseGrad_p.shape()(1)/2;
      28             :    
      29           0 :   for(Int iy=-support_ptr[1]; iy <= support_ptr[1]; iy++) 
      30             :     {
      31           0 :       iLoc[1]    = SynthesisUtils::nint(sampling_ptr[1]*iy+off_ptr[1]);
      32           0 :       igrdpos_ptr[1] = loc_ptr[1]+iy;
      33           0 :       iCFPos_ptr[1]  = iLoc[1] + convOrigin_ptr[1];
      34             : 
      35           0 :       for(Int ix=-support_ptr[0]; ix <= support_ptr[0]; ix++) 
      36             :         {
      37           0 :           iLoc[0]    = SynthesisUtils::nint(sampling_ptr[0]*ix+off_ptr[0]);
      38           0 :           igrdpos_ptr[0] = loc_ptr[0]+ix;
      39           0 :           iCFPos_ptr[0]  = iLoc[0] + convOrigin_ptr[0];
      40             :           {
      41           0 :             wt=getFrom4DArray((const Complex * __restrict__ &)convFuncV,
      42             :                               //igrdpos,cfInc_p);
      43             :                               iCFPos_ptr,cfInc_p_ptr);
      44           0 :             if (dataWVal <= 0.0) wt = conj(wt);
      45           0 :             norm(ipol)+=(wt);
      46           0 :             if (finitePointingOffset) 
      47             :               {
      48           0 :                 wt *= conj(cached_phaseGrad_p(iLoc[0]+phaseGradOrigin_l[0],
      49           0 :                                               iLoc[1]+phaseGradOrigin_l[1]));
      50             :               }
      51             :             // nvalue+=wt*grid(grdpos);
      52             :             // The following uses raw index on the 4D grid
      53             :             // nvalue+=wt*getFrom4DArray(gridStore,iPosPtr,gridInc);
      54           0 :             nvalue+=wt*getFrom4DArray(gridStore,igrdpos_ptr,gridInc_p_ptr);
      55             :             //nvalue+=wt*getFrom4DArray(gridStore,igrdpos,gridInc_p);
      56             :           }
      57             :         }
      58             :     }
      59           0 :   nvalue = nvalue *conj(phasor);
      60           0 : }
      61             : //--------------------------------------------------------------------------------

Generated by: LCOV version 1.16