LCOV - code coverage report
Current view: top level - synthesis/TransformMachines2 - accumulateToGrid.inc (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 0 31 0.0 %
Date: 2024-10-10 11:40:37 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           0 :     Complex wt;
      10             : 
      11           0 :     Vector<Int> iCFPos(4,0);
      12           0 :     const Int * __restrict__ gridInc_p_ptr= gridInc_p.getStorage(Dummy);
      13           0 :     const Int * __restrict__ iGrdPosPtr = igrdpos.getStorage(Dummy);
      14           0 :     T* __restrict__ gridStore = grid.getStorage(Dummy);
      15             : 
      16           0 :     const Int* scaledSupport_ptr=support.getStorage(Dummy);
      17           0 :     const Float *scaledSampling_ptr=sampling.getStorage(Dummy);
      18           0 :     const Double *off_ptr=off.getStorage(Dummy);
      19           0 :     const Int *loc_ptr = loc.getStorage(Dummy);
      20           0 :     Int *iCFPos_ptr = iCFPos.getStorage(Dummy);
      21           0 :     const Int* convOrigin_ptr=convOrigin.getStorage(Dummy);
      22           0 :     Int *igrdpos_ptr=igrdpos.getStorage(Dummy);
      23           0 :     Int *cfInc_p_ptr = cfInc_p.getStorage(Dummy);
      24             :     
      25             :     Int phaseGradOrigin_l[2];
      26           0 :     phaseGradOrigin_l[0] = cached_phaseGrad_p.shape()(0)/2;
      27           0 :     phaseGradOrigin_l[1] = cached_phaseGrad_p.shape()(0)/2;
      28             :    
      29             : 
      30           0 :     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           0 :         iLoc[1]=(Int)((scaledSampling_ptr[1]*iy+off_ptr[1]));
      34           0 :         igrdpos_ptr[1]=loc_ptr[1]+iy;
      35           0 :         iCFPos_ptr[1] =iLoc[1]+convOrigin_ptr[1];
      36             : 
      37           0 :         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           0 :             iLoc[0]=(Int)((scaledSampling_ptr[0]*ix+off_ptr[0]));
      41           0 :             igrdpos_ptr[0]=loc_ptr[0]+ix;
      42           0 :             iCFPos_ptr[0] =iLoc[0]+convOrigin_ptr[0];
      43           0 :             wt = getFrom4DArray((const Complex * __restrict__ &)convFuncV, 
      44             :                                 iCFPos_ptr,cfInc_p_ptr);//cfArea;
      45           0 :             if (dataWVal > 0.0) {wt = conj(wt);}
      46           0 :             norm += (wt);
      47           0 :             if (finitePointingOffsets)
      48             :               {
      49           0 :                 wt *= cached_phaseGrad_p(iLoc[0]+phaseGradOrigin_l[0],
      50           0 :                                          iLoc[1]+phaseGradOrigin_l[1]);
      51             :               }
      52           0 :             addTo4DArray_ptr(gridStore,iGrdPosPtr,gridInc_p_ptr, nvalue,wt);
      53             :           }
      54             :       }
      55           0 :   }

Generated by: LCOV version 1.16