 
 //CompareAccuracy("../cputrack-test/lut000.jpg");
 //QTrkCompareTest();
-/*	ProfileSpeedVsROI(LT_QI, "speeds-qi.txt", true);
-	ProfileSpeedVsROI(LT_OnlyCOM, "speeds-com.txt", false);
-	ProfileSpeedVsROI(LT_OnlyCOM, "speeds-com-z.txt", true);
-	*/
+
+	ProfileSpeedVsROI(LT_OnlyCOM, "speeds-com.txt", false, 0);
+	ProfileSpeedVsROI(LT_OnlyCOM, "speeds-com-z.txt", true, 0);
+	for (int qi_it=1;qi_it<=4;qi_it++) {
+		ProfileSpeedVsROI(LT_QI, SPrintf("speeds-qi-%d-iterations.txt",qi_it).c_str(), true, qi_it);
+	}
+
 	/*auto info = SpeedCompareTest(80, false);
 	auto infogc = SpeedCompareTest(80, true);
 	dbgprintf("[gainc=false] CPU: %f, GPU: %f\n", info.speed_cpu, info.speed_gpu); 

	return info;
}

void ProfileSpeedVsROI(LocalizeModeEnum locMode, const char *outputcsv, bool haveZLUT)
{
	int N=24;
	float* values = new float[N*3];

	for (int i=0;i<N;i++) {
		int roi = 40+i*5;
		SpeedInfo info = SpeedCompareTest(roi, locMode, haveZLUT);
		values[i*3+0] = roi;
		values[i*3+1] = info.speed_cpu;
		values[i*3+2] = info.speed_gpu;

	float sched_cpu, sched_gpu;
};

SpeedInfo SpeedCompareTest(int w, LocalizeModeEnum locMode, bool haveZLUT, int qi_iterations=3)
{
	int cudaBatchSize = 1024;
	int count = 60000;

#ifdef _DEBUG
	count = 100;
