     nPoint->readable = true;
     ellipse.computeHomographyFromImagedCenter( nPoint->point, nPoint->mHomography );
     nPoint->mHomography.invert( nPoint->mInvHomography );
-
-
-#if 0
-    const dim3 block( 32, // we use this to sum up signals
-                      32, // 32 cuts in one block
-                      1 );
-    const dim3 grid(  grid_divide( vCutSize, 32 ), // ceil(#cuts/32) blocks needed
-                      1,
-                      1 );
-#else
+}
+
+__global__
+void getSignalsAllNearbyPoints(
+    cv::cuda::PtrStepSzb               src,
+    const int                          vCutSize,
+    NearbyPoint*                       point_buffer,
+    const identification::CutStruct*   cut_buffer,
+    identification::CutSignals*        sig_buffer )
+{
+    const size_t gridNSample = tagParam.gridNSample;
+    const int i = blockIdx.y;
+    const int j = blockIdx.z;
+    const int idx = j * gridNSample + i;
+
+    NearbyPoint* nPoint = &point_buffer[idx];
+    identification::CutSignals* signals = &sig_buffer[idx * vCutSize];
+
     const dim3 block( 32, 1, 1 ); // we use this to sum up signals
     const dim3 grid( vCutSize, 1, 1 );
-#endif
 
     popart::identification::idGetSignals
         <<<grid,block>>>


    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 );

}

__global__
void initAllNearbyPoints(
    bool                               first_iteration,
    const popart::geometry::ellipse    ellipse,
    const popart::geometry::matrix3x3  mT,
    float2                             center,
    const float                        neighbourSize,
    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) );
