The helper functions to read, allocate, and write ppm files: ppm.c, ppm.h.
Develop a CUDA program that takes two PPM images and merges them. That is every new pixel is the sum of average of the two corresponding pixels from the input images: new[i][j] = (in_a[i][j] + in_b[i][j]) / 2.