CPU implementation working. Write kernels, test on gpu.
printing direction.