 
   __shared__ float s_block[ WS ][ WS+1 ];
 
-    float (*bdata)[WS+1] = (float (*)[WS+1]) &s_block[ty][tx];
+  float (*bdata)[WS+1] = (float (*)[WS+1]) &s_block[ty][tx];
 
   g_inout += (row0+ty)*c_width+col;
   if( by > 0 ) g_y += (by-1)*c_width+col;
   if( bx > 0 ) g_v += (bx-1)*c_height+row0+tx;
 
 #pragma unroll
-    for (int i = 0; i < WS-(WS%SOW); i+=SOW) {
-        **bdata = *g_inout;
-        bdata += SOW;
-        g_inout += SOW * c_width;
-    }
-    if( ty < WS%SOW ) {
-        **bdata = *g_inout;
-    }
+  for (int i = 0; i < WS-(WS%SOW); i+=SOW) {
+    **bdata = *g_inout;
+    bdata += SOW;
+    g_inout += SOW * c_width;
+  }
+  if( ty < WS%SOW ) {
+    **bdata = *g_inout;
+  }
 
   __syncthreads();
 
   if( ty == 0 ) {
 
-        {   // calculate y -----------------------
-            float (*bdata)[WS+1] = (float (*)[WS+1]) &s_block[0][tx];
-
-            float prev;
-            if( by > 0 ) prev = *g_y;
-            else prev = 0.f;
-
-#pragma unroll
-            for (int i = 0; i < WS; ++i, ++bdata)
-                **bdata = prev = **bdata + prev;
-        }
-
-        {   // calculate x -----------------------
-            float *bdata = s_block[tx];
-
-            float prev;
-            if( bx > 0 ) prev = *g_v;
-            else prev = 0.f;
-
-#pragma unroll
-            for (int i = 0; i < WS; ++i, ++bdata)
-                *bdata = prev = *bdata + prev;
-        }
+    {   // calculate y -----------------------
+      float (*bdata)[WS+1] = (float (*)[WS+1]) &s_block[0][tx];
+
+      float prev;
+      if( by > 0 ) prev = *g_y;
+      else prev = 0.f;
+
+#pragma unroll
+      for (int i = 0; i < WS; ++i, ++bdata)
+        **bdata = prev = **bdata + prev;
+    }
+
+    {   // calculate x -----------------------
+      float *bdata = s_block[tx];
+
+      float prev;
+      if( bx > 0 ) prev = *g_v;
+      else prev = 0.f;
+
+#pragma unroll
+      for (int i = 0; i < WS; ++i, ++bdata)
+        *bdata = prev = *bdata + prev;
+    }
 
   }
 
   __syncthreads();
 
-    bdata = (float (*)[WS+1]) &s_block[ty][tx];
+  bdata = (float (*)[WS+1]) &s_block[ty][tx];
 
   g_inout -= (WS-(WS%SOW))*c_width;
 
 #pragma unroll
-    for (int i = 0; i < WS-(WS%SOW); i+=SOW) {
-        *g_inout = **bdata;
-        bdata += SOW;
-        g_inout += SOW * c_width;
-    }
-    if( ty < WS%SOW ) {
-        *g_inout = **bdata;
-    }
+  for (int i = 0; i < WS-(WS%SOW); i+=SOW) {
+    *g_inout = **bdata;
+    bdata += SOW;
+    g_inout += SOW * c_width;
+  }
+  if( ty < WS%SOW ) {
+    *g_inout = **bdata;
+  }
 }
 
 /**

      g_ysum += c_m_size;
    }

        // fix ybar -> y -------------------------

    g_ybar += c_width;
    y = *g_ybar += y;

 *  @param[in] g_y All \f$P_{m,n}(Y)\f$
 *  @param[in] g_v All \f$P^T_{m,n}(V)\f$
 */
  __global__
void algSAT_stage4(const int c_width, const int c_height, float *g_out,
    const float *g_in,
    const float *g_y,
    const float *g_v )
