1. A data processing apparatus comprising: a circuit selector that makes a selection, in data processing in which a plurality of unit processes are each selected and repeated, from a generalized circuit that executes the plurality of unit processes and one of dedicated circuits that are each dedicated to a corresponding one of the unit processes, the selection being made repeatedly on a basis of a judgment made using continuous repeat counts each of which indicates how many times a corresponding one of the unit processes is continuously repeated; and a data processor that selectively configures one of the generalized circuit and the dedicated circuit that corresponds to one of results serially obtained from the selection repeatedly made by the circuit selector, the data processor performing the data processing.