Rev 154 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 154 | Rev 156 | ||
---|---|---|---|
Line 242... | Line 242... | ||
242 | } |
242 | } |
243 | WaitForAllThreadsInitialized(); |
243 | WaitForAllThreadsInitialized(); |
244 | ThreadAffinity(0); |
244 | ThreadAffinity(0); |
245 | #endif |
245 | #endif |
246 | if (search_nodes) |
246 | if (search_nodes) |
247 | nodes_between_time_checks = search_nodes; |
247 | nodes_between_time_checks = (unsigned int) search_nodes; // Pierre-Marie Baty -- added type cast |
248 | /* |
248 | /* |
249 | ************************************************************ |
249 | ************************************************************ |
250 | * * |
250 | * * |
251 | * Main iterative-deepening loop starts here. We either * |
251 | * Main iterative-deepening loop starts here. We either * |
252 | * start at depth = 1, or if we are pondering and have a * |
252 | * start at depth = 1, or if we are pondering and have a * |
Line 312... | Line 312... | ||
312 | nodes_between_time_checks /= 10; |
312 | nodes_between_time_checks /= 10; |
313 | } else |
313 | } else |
314 | nodes_between_time_checks = Min(nodes_per_second, 1000000); |
314 | nodes_between_time_checks = Min(nodes_per_second, 1000000); |
315 | } |
315 | } |
316 | if (search_nodes) |
316 | if (search_nodes) |
317 | nodes_between_time_checks = search_nodes - tree->nodes_searched; |
317 | nodes_between_time_checks = (unsigned int) (search_nodes - tree->nodes_searched); // Pierre-Marie Baty -- added type cast |
318 | nodes_between_time_checks = |
318 | nodes_between_time_checks = |
319 | Min(nodes_between_time_checks, MAX_TC_NODES); |
319 | Min(nodes_between_time_checks, MAX_TC_NODES); |
320 | next_time_check = nodes_between_time_checks; |
320 | next_time_check = nodes_between_time_checks; |
321 | /* |
321 | /* |
322 | ************************************************************ |
322 | ************************************************************ |
Line 514... | Line 514... | ||
514 | * iteration to the current score +/- 16. * |
514 | * iteration to the current score +/- 16. * |
515 | * * |
515 | * * |
516 | ************************************************************ |
516 | ************************************************************ |
517 | */ |
517 | */ |
518 | if (end_time - start_time > 10) |
518 | if (end_time - start_time > 10) |
519 | nodes_per_second = |
519 | nodes_per_second = (unsigned int) // Pierre-Marie Baty -- added type cast |
520 | tree->nodes_searched * 100 / (uint64_t) (end_time - start_time); |
520 | (tree->nodes_searched * 100 / (uint64_t) (end_time - start_time)); |
521 | else |
521 | else |
522 | nodes_per_second = 1000000; |
522 | nodes_per_second = 1000000; |
523 | tree->pv[0] = root_moves[0].path; |
523 | tree->pv[0] = root_moves[0].path; |
524 | if (!abort_search && value != -(MATE - 1)) { |
524 | if (!abort_search && value != -(MATE - 1)) { |
525 | if (end_time - start_time >= noise_level) { |
525 | if (end_time - start_time >= noise_level) { |
Line 584... | Line 584... | ||
584 | * * |
584 | * * |
585 | ************************************************************ |
585 | ************************************************************ |
586 | */ |
586 | */ |
587 | end_time = ReadClock(); |
587 | end_time = ReadClock(); |
588 | if (end_time > 10) |
588 | if (end_time > 10) |
589 | nodes_per_second = |
589 | nodes_per_second = (unsigned int) // Pierre-Marie Baty -- added type cast |
590 | (uint64_t) tree->nodes_searched * 100 / Max((uint64_t) end_time - |
590 | ((uint64_t) tree->nodes_searched * 100 / Max((uint64_t) end_time - |
591 | start_time, 1); |
591 | start_time, 1)); |
592 | if (abort_search != 2 && !puzzling) { |
592 | if (abort_search != 2 && !puzzling) { |
593 | if (noise_block) |
593 | if (noise_block) |
594 | DisplayPV(tree, 5, wtm, end_time - start_time, &tree->pv[0], 1); |
594 | DisplayPV(tree, 5, wtm, end_time - start_time, &tree->pv[0], 1); |
595 | tree->evaluations = (tree->evaluations) ? tree->evaluations : 1; |
595 | tree->evaluations = (tree->evaluations) ? tree->evaluations : 1; |
596 | tree->fail_highs++; |
596 | tree->fail_highs++; |
Line 623... | Line 623... | ||
623 | npc = 21; |
623 | npc = 21; |
624 | cpl = 75; |
624 | cpl = 75; |
625 | for (i = 1; i < 16; i++) |
625 | for (i = 1; i < 16; i++) |
626 | if (tree->LMR_done[i]) { |
626 | if (tree->LMR_done[i]) { |
627 | sprintf(buff, "%d/%s", i, DisplayKMB(tree->LMR_done[i], 0)); |
627 | sprintf(buff, "%d/%s", i, DisplayKMB(tree->LMR_done[i], 0)); |
628 | if (npc + strlen(buff) > cpl) { |
628 | if (npc + (int) strlen(buff) > cpl) { // Pierre-Marie Baty -- added type cast |
629 | Print(8, "\n "); |
629 | Print(8, "\n "); |
630 | npc = 12; |
630 | npc = 12; |
631 | } |
631 | } |
632 | Print(8, " %s", buff); |
632 | Print(8, " %s", buff); |
633 | npc += strlen(buff) + 2; |
633 | npc += strlen(buff) + 2; |
Line 639... | Line 639... | ||
639 | if (tree->null_done[null_depth]) |
639 | if (tree->null_done[null_depth]) |
640 | Print(8, " null-move (R):"); |
640 | Print(8, " null-move (R):"); |
641 | for (i = null_depth; i < 16; i++) |
641 | for (i = null_depth; i < 16; i++) |
642 | if (tree->null_done[i]) { |
642 | if (tree->null_done[i]) { |
643 | sprintf(buff, "%d/%s", i, DisplayKMB(tree->null_done[i], 0)); |
643 | sprintf(buff, "%d/%s", i, DisplayKMB(tree->null_done[i], 0)); |
644 | if (npc + strlen(buff) > cpl) { |
644 | if (npc + (int) strlen(buff) > cpl) { // Pierre-Marie Baty -- added type cast |
645 | Print(8, "\n "); |
645 | Print(8, "\n "); |
646 | npc = 12; |
646 | npc = 12; |
647 | } |
647 | } |
648 | Print(8, " %s", buff); |
648 | Print(8, " %s", buff); |
649 | npc += strlen(buff) + 2; |
649 | npc += strlen(buff) + 2; |