adding batch mode to cpu version for better comparison