Nature Language: repTimeCheck:Checks if the time for the benchmark reached the target time. Changes the number of repetitions for the next data size based on the difference between the time taken and the target time.
  
CPP: int repTimeCheck(double time, int numReps){\n\tint repCheck;\n\n\tif (time < targetTime){\n\t\trepsToDo = 2 * numReps;\n\t\trepCheck = FALSE;\n\t}\n\telse if (time > (2 * targetTime)){\n\t\trepsToDo = max(numReps/2,1);\n\t\trepCheck = TRUE;\n\t}\n\telse {\n\t\trepCheck = TRUE;\n\t}\n\n\treturn repCheck;\n}
  
Fortran: FUNCTION repTimeCheck(time, numReps)\n\tDOUBLE PRECISION, intent(in) :: time\n\tinteger, intent(in) :: numReps\n\tlogical :: repTimeCheck\n\n\tIF (time < targetTime) THEN\n\t\t!double repsToDo and repeat benchmark\n\t\trepsToDo = 2numReps\n\t\trepTimeCheck = .false.\n\tELSE IF (time > (2targetTime)) THEN\n\t\t!finish benchmark and half number of reps for next dataSize\n\t\trepsToDo = MAX(numReps/2,1) !repsToDo is at least 1\n\t\trepTimeCheck = .true.\n\tELSE !time is >= targetTime\n\t\t!finish benchmark and keep reps for next data size\n\t\trepTimeCheck = .true.\n\tEND IF\n\nEND FUNCTION repTimeCheck
  