A general and efficient divide-and-conquer algorithm framework for multi-core clusters