Lines Matching refs:loops

108 static DEFINE_int(loops, kAutoTuneLoops, loops_help_txt().c_str());
121 "Try up to this many times to guess loops for a bench, or skip the bench.");
284 static double time(int loops, Benchmark* bench, Target* target) {
292 bench->draw(loops, canvas);
308 static int detect_forever_loops(int loops) {
310 if (loops < 0) {
311 loops = SK_MaxS32;
313 return loops;
316 static int clamp_loops(int loops) {
317 if (loops < 1) {
318 SkDebugf("ERROR: clamping loops from %d to 1. "
319 "There's probably something wrong with the bench.\n", loops);
322 if (loops > FLAGS_maxLoops) {
323 SkDebugf("WARNING: clamping loops from %d to FLAGS_maxLoops, %d.\n", loops, FLAGS_maxLoops);
326 return loops;
364 // First figure out approximately how many loops of bench it takes to make overhead negligible.
367 int loops = bench->calculateLoops(FLAGS_loops);
368 if (kAutoTuneLoops == loops) {
371 SkDebugf("WARNING: Can't estimate loops for %s (%s vs. %s); skipping.\n",
395 if (kAutoTuneLoops == loops) {
398 loops = (int)ceil(numer / denom);
399 loops = clamp_loops(loops);
401 loops = detect_forever_loops(loops);
404 return loops;
408 // First, figure out how many loops it'll take to get a frame up to FLAGS_gpuMs.
409 int loops = bench->calculateLoops(FLAGS_loops);
410 if (kAutoTuneLoops == loops) {
411 loops = 1;
414 if (1<<30 == loops) {
416 loops = 0;
419 loops *= 2;
423 elapsed = time(loops, bench, target);
428 loops = (int)ceil(loops * FLAGS_gpuMs / elapsed);
429 loops = clamp_loops(loops);
434 loops = detect_forever_loops(loops);
439 time(loops, bench, target);
442 return loops;
1237 SkDebugf("Fixed number of loops; times would only be misleading so we won't print them.\n");
1309 int loops = target->needsFrameTiming(&maxFrameLag)
1313 if (kFailedLoops == loops) {
1324 time(loops, bench.get(), target);
1333 samples.push_back(time(loops, bench.get(), target) / loops);
1339 samples[s] = time(loops, bench.get(), target) / loops;
1446 , loops