 }
 
 __global__
-void getSignalsAllNearbyPoints(
+void initAllNearbyPoints(
     bool                               first_iteration,
-    cv::cuda::PtrStepSzb               src,
     const popart::geometry::ellipse    ellipse,
     const popart::geometry::matrix3x3  mT,
-    // const popart::geometry::matrix3x3  mInvT,
     float2                             center,
-    const int                          vCutSize,
     const float                        neighbourSize,
-    NearbyPoint*                       point_buffer,
-    const identification::CutStruct*   cut_buffer,
-    identification::CutSignals*        sig_buffer )
+    NearbyPoint*                       point_buffer )
 {
     const size_t gridNSample = tagParam.gridNSample;
+
+    assert( gridDim.y == gridNSample );
+    assert( gridDim.z == gridNSample );
+
     const float  gridWidth   = neighbourSize;
     const float  halfWidth   = gridWidth/2.0f;
     const float  stepSize    = gridWidth * __frcp_rn( float(gridNSample-1) );


    const int i = blockIdx.y;
    const int j = blockIdx.z;
    if( i >= gridNSample ) return;
    if( j >= gridNSample ) return;

    const int idx = j * gridNSample + i;


    NearbyPoint* nPoint = &point_buffer[idx];
    identification::CutSignals* signals = &sig_buffer[idx * vCutSize];

    float2 condCenter = make_float2( center.x - halfWidth + i*stepSize,
                                     center.y - halfWidth + j*stepSize );

        float neighSize = currentNeighbourSize * max( transformedEllipse.a(),
                                                      transformedEllipse.b() );

        dim3 block( 1, 1, 1 );
        dim3 grid( 1, gridNSample, gridNSample );

        popart::identification::initAllNearbyPoints
            <<<grid,block,0,tagStream>>>
            ( first_iteration,
              ellipse,
              mT,
              center,
              neighSize,
              point_buffer );
        POP_CHK_CALL_IFSYNC;

        popart::identification::getSignalsAllNearbyPoints
            <<<grid,block,0,tagStream>>>
            ( _d_plane,
              vCutSize,
              point_buffer,
              cut_buffer,
              sig_buffer );
