mirror of
https://gitlab.com/scemama/QCaml.git
synced 2024-07-26 04:37:26 +02:00
Parallel and single-core give exact same result
This commit is contained in:
parent
e56e01197d
commit
e64e6c73dc
@ -235,7 +235,7 @@ module Make(Zero_m : Zero_mType) = struct
|
|||||||
let t0 = Unix.gettimeofday () in
|
let t0 = Unix.gettimeofday () in
|
||||||
let ishell = ref max_int in
|
let ishell = ref max_int in
|
||||||
|
|
||||||
let input_stream = Stream.of_list (List.rev shell_pairs) in
|
let input_stream = Stream.of_list shell_pairs in
|
||||||
|
|
||||||
let f shell_p =
|
let f shell_p =
|
||||||
let () =
|
let () =
|
||||||
@ -248,31 +248,33 @@ module Make(Zero_m : Zero_mType) = struct
|
|||||||
in
|
in
|
||||||
|
|
||||||
let result = ref [] in
|
let result = ref [] in
|
||||||
try
|
let () =
|
||||||
List.iter (fun shell_q ->
|
try
|
||||||
let () =
|
List.iter (fun shell_q ->
|
||||||
if Cs.index (Csp.shell_a shell_q) >
|
let () =
|
||||||
Cs.index (Csp.shell_a shell_p) then
|
if Cs.index (Csp.shell_a shell_q) >
|
||||||
raise Exit
|
Cs.index (Csp.shell_a shell_p) then
|
||||||
in
|
raise Exit
|
||||||
let sq = Csp.shell_pairs shell_q in
|
|
||||||
let cspc =
|
|
||||||
if Array.length sp < Array.length sq then
|
|
||||||
Cspc.make ~cutoff shell_p shell_q
|
|
||||||
else
|
|
||||||
Cspc.make ~cutoff shell_q shell_p
|
|
||||||
in
|
|
||||||
|
|
||||||
match cspc with
|
|
||||||
| Some cspc ->
|
|
||||||
let cls =
|
|
||||||
class_of_contracted_shell_pair_couple cspc
|
|
||||||
in
|
in
|
||||||
result := (store_class_parallel ~cutoff cspc cls) :: !result;
|
let sq = Csp.shell_pairs shell_q in
|
||||||
| None -> ()
|
let cspc =
|
||||||
) shell_pairs;
|
if Array.length sp < Array.length sq then
|
||||||
raise Exit
|
Cspc.make ~cutoff shell_p shell_q
|
||||||
with Exit -> List.concat !result |> Array.of_list
|
else
|
||||||
|
Cspc.make ~cutoff shell_q shell_p
|
||||||
|
in
|
||||||
|
|
||||||
|
match cspc with
|
||||||
|
| Some cspc ->
|
||||||
|
let cls =
|
||||||
|
class_of_contracted_shell_pair_couple cspc
|
||||||
|
in
|
||||||
|
result := (store_class_parallel ~cutoff cspc cls) :: !result;
|
||||||
|
| None -> ()
|
||||||
|
) shell_pairs;
|
||||||
|
with Exit -> ()
|
||||||
|
in
|
||||||
|
List.concat !result |> Array.of_list
|
||||||
in
|
in
|
||||||
|
|
||||||
let eri_array =
|
let eri_array =
|
||||||
|
Loading…
Reference in New Issue
Block a user