Optimal VLSI Dictionary Machines on Meshes