     srand((FLAGS_random_seed < 0) ? curtime : FLAGS_random_seed);
 
     // Create input data
-    std::vector<T> host_image(width * height, 0);
+    std::vector<unsigned char> host_image(width * height, 0);
     for (size_t i = 0; i < width * height; ++i)
-        host_image[i] = (rand() < (RAND_MAX / 4)) ? T(1) : T(0);
-    
-    std::vector<T> host_resultMAPS(width * height, 0);
-
-    inStride = outStride = sizeof(T) * width;
+        host_image[i] = (rand() < (RAND_MAX / 4)) ? 1 : 0;
+    
+    std::vector<unsigned char> host_resultMAPS(width * height, 0);
+
+    inStride = outStride = sizeof(unsigned char) * width;
 
     dev_inImage = &host_image[0];
     dev_outImage = &host_resultMAPS[0];
     
     for (int i = 0; i < FLAGS_repetitions; i++)
     {
-        GameOfLife_CPUTick(dev_inImage, inStride / sizeof(T),
-                           dev_outImage, outStride / sizeof(T), (int)width, (int)height);
+        GameOfLife_CPUTick(dev_inImage, inStride / sizeof(unsigned char),
+                           dev_outImage, outStride / sizeof(unsigned char), (int)width, (int)height);
         
         std::swap(dev_inImage, dev_outImage);
     }

    return (numErrors == 0);
}

template<typename T, int IPX, int IPY>
bool RunGoL(int ngpus)
{
    size_t width = FLAGS_width, height = FLAGS_height;

    srand((FLAGS_random_seed < 0) ? curtime : FLAGS_random_seed);

    // Create input data
    std::vector<T> host_image(width * height, 0);
    for (size_t i = 0; i < width * height; ++i)
        host_image[i] = (rand() < (RAND_MAX / 4)) ? T(1) : T(0);

    // Create GPU list
    int num_gpus;

	FILE *fp = fopen(filename, "wb");
	if (fp)
	{
		fprintf(fp, "P5\n%lu %lu\n1\n", width, height);
		fwrite(data, sizeof(unsigned char), width * height, fp);
		fclose(fp);
	}
}


bool GoLCPURegression(const unsigned char *otherResult)
{
    if (!FLAGS_regression)
        return true;

    unsigned char *dev_inImage = NULL, *dev_outImage = NULL;

    size_t width = FLAGS_width, height = FLAGS_height, inStride = 0, outStride = 0;

