Test code for 2d kernel