1. A method of configuring a programmable logic device to perform a computation, where the programmable logic device contains logic elements connected in a carry chain, the method comprising: decomposing a computation into a tree of sub-computations; identifying a chain of sub-computations in the tree of sub-computations; associating the chain of sub-computations with a carry chain; and configuring the logic elements in the carry chain of the programmable logic device to perform the chain of sub-computations using carry chain logic in the logic elements.