Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit 5500fccc authored by Cyril SIX's avatar Cyril SIX
Browse files

Adding overpredicts

parent 47eaaa23
......@@ -37,16 +37,19 @@ let set_stats_oc () =
let stats_nb_total = ref 0
(* we predicted the same thing as the profiling *)
let stats_nb_correct_predicts = ref 0
(* we predicted something (say Some true), but the profiling predicted the opposite (say Some false, or None) *)
(* we predicted something (say Some true), but the profiling predicted the opposite (say Some false) *)
let stats_nb_mispredicts = ref 0
(* we did not predict anything (None) even though the profiling did predict something *)
let stats_nb_missed_opportunities = ref 0
(* we predicted something (say Some true) but the profiling preferred not to predict anything (None) *)
let stats_nb_overpredict = ref 0
let reset_stats () = begin
stats_nb_total := 0;
stats_nb_correct_predicts := 0;
stats_nb_mispredicts := 0;
stats_nb_missed_opportunities := 0;
stats_nb_overpredict := 0;
end
let incr theref = theref := !theref + 1
......@@ -59,7 +62,7 @@ let write_stats_oc () =
match !stats_oc with
| None -> ()
| Some oc -> begin
Printf.fprintf oc "%d %d %d %d\n" !stats_nb_total !stats_nb_correct_predicts !stats_nb_mispredicts !stats_nb_missed_opportunities;
Printf.fprintf oc "%d %d %d %d %d\n" !stats_nb_total !stats_nb_correct_predicts !stats_nb_mispredicts !stats_nb_missed_opportunities !stats_nb_overpredict;
close_out oc
end
......@@ -470,7 +473,7 @@ let update_direction direction = function
incr stats_nb_total;
match pred, direction with
| None, None -> incr stats_nb_correct_predicts
| None, Some _ -> incr stats_nb_mispredicts
| None, Some _ -> incr stats_nb_overpredict
| Some _, None -> incr stats_nb_missed_opportunities
| Some false, Some false -> incr stats_nb_correct_predicts
| Some false, Some true -> incr stats_nb_mispredicts
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment