This is a mutlithreaded implementation of the basis calculation of an Image Compression algorithm based on finding 2D motifs of an image by performing Auto-corelation of the image with itself. The code contains implementation using CUDA API and the Cilk threads (Intel compiler)