bitmaps in parallel over the rows and columns of the adjacency matrix. The reduction on each row is implemented by sending mes-sages to downstream neighbors and executing the necessary bit computation before re-injecting the message into the network to-wards the next stage of the wavefront algorithm. The wavefront algorithm performs a bit-level parallel prefix over a large bitmap. The same algorithm can also be executed entirely in the network by mapping the 2D logical decomposition into the DCR registers of the torus network. The logical grid to torus mapping can be easily determined in a way that each logical link is uniquely mapped onto a physical link between neighboring nodes.