     unsigned int block_equ_size = grid_dim.x * grid_dim.y * sizeof(uint8_t);
     unsigned int grid_equ_size = 1 * sizeof(uint8_t);
 
-    // // TODO : remove
-    // uint8_t* pixel_equ = (uint8_t*) malloc(pixel_equ_size);
-    // uint8_t* block_equ = (uint8_t*) malloc(block_equ_size);
-
     cudaError d_src_malloc_success = cudaMalloc((void**) &d_src_data, data_size);
     cudaError d_dst_malloc_success = cudaMalloc((void**) &d_dst_data, data_size);
     cudaError d_pixel_equ_malloc_success = cudaMalloc((void**) &d_pixel_equ, pixel_equ_size);

        printf(".");
        fflush(stdout);
    } while (!grid_equ);
    // } while (0);

    // // TODO : remove
    // for (unsigned int i = 0; i < pixel_equ_size; i++) {
    //     if (pixel_equ[i] != 1) {
    //         printf("pixel_equ[%u] = %u\n", i, pixel_equ[i]);
    //         fflush(stdout);
    //     }
    // }

    // bring data back from device
    cudaMemcpy((*dst_bitmap)->data, d_dst_data, data_size, cudaMemcpyDeviceToHost);

    // Computing the grid dimensions depends on PAD_TOP and PAD_LEFT.
    unsigned int block_dim_x = strtol(block_dim_x_string, NULL, 10);
    unsigned int block_dim_y = strtol(block_dim_y_string, NULL, 10);
    assert((block_dim_x * block_dim_y) <= MAX_THREADS_PER_BLOCK);

    unsigned int grid_dim_x = (unsigned int) ceil((src_bitmap->width) / ((double) block_dim_x));
    unsigned int grid_dim_y = (unsigned int) ceil((src_bitmap->height)/ ((double) block_dim_y));
    dim3 block_dim(block_dim_x, block_dim_y);
