     int s_src_col = threadIdx.x + PAD_LEFT;
     int s_src_width = blockDim.x + PAD_LEFT + PAD_RIGHT;
 
-    int s_is_src_dst_white_row = threadIdx.y;
-    int s_is_src_dst_white_col = threadIdx.x;
-    int s_is_src_dst_white_width = blockDim.x;
+    int s_dst_row = threadIdx.y;
+    int s_dst_col = threadIdx.x;
+    int s_dst_width = blockDim.x;
+
+    int s_equ_row = threadIdx.y;
+    int s_equ_col = threadIdx.x;
+    int s_equ_width = blockDim.x;
 
     // load g_src into shared memory
     if ((threadIdx.y == 0) & (threadIdx.x == 0)) {

    uint8_t are_identical_bitmaps = 0;
    int iterations = 0;
    do {
        int skeletonize_pass_shared_mem_size = (((block_dim.x + PAD_LEFT + PAD_RIGHT) * (block_dim.y + PAD_TOP + PAD_BOTTOM)) + (block_dim.x * block_dim.y)) * sizeof(uint8_t);
        skeletonize_pass<<<grid_dim, block_dim, skeletonize_pass_shared_mem_size>>>(g_src_data, g_dst_data, (*src_bitmap)->width, (*src_bitmap)->height);
        gpuErrchk(cudaPeekAtLastError());
        gpuErrchk(cudaDeviceSynchronize());

    extern __shared__ uint8_t s_data[];

    uint8_t* s_src = &s_data[0];
    uint8_t* s_dst = &s_data[(blockDim.x + PAD_LEFT + PAD_RIGHT) * (blockDim.y + PAD_TOP + PAD_BOTTOM)];
    uint8_t* s_equ = &s_data[2 * (blockDim.x + PAD_LEFT + PAD_RIGHT) * (blockDim.y + PAD_TOP + PAD_BOTTOM)];

    int g_row = blockIdx.y * blockDim.y + threadIdx.y;
    int g_col = blockIdx.x * blockDim.x + threadIdx.x;
