1. A computation device for performing an inference task specified by a plurality of variables and a plurality of factors, the device comprising: a plurality of processing elements operable in parallel; and a controller having an interface for a host system for accepting a specification of at least part of the inference task, wherein one of the processing elements is configurable by the controller to perform a computation associated with one of the factors concurrently with other of the processing elements performing computation associated with different ones of the factors; and the one of the processing elements includes a first storage for a definition of a plurality of input message values based on a factor associated with a subset of the variables, a second storage, and one or more arithmetic logic units including a combination unit configured to receive the plurality of input message values, to receive a weight, and to compute a sum of the input message values and the weight to produce an output, and an accumulation unit configured to determine whether the output is less than a predetermined value and to store the output in the second storage, if the output is less than the predetermined value.