Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
verimag
synchrone
sasa
Commits
d9301991
Commit
d9301991
authored
May 21, 2021
by
erwan
Browse files
Update: Add a Seed.reset function
parent
698a46ae
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/sasacore/seed.ml
View file @
d9301991
(* Time-stamp: <modified the 2
0
/05/2021 (at
09:23
) by Erwan Jahier> *)
(* Time-stamp: <modified the 2
1
/05/2021 (at
17:18
) by Erwan Jahier> *)
let
seed
=
ref
None
let
replay_seed
=
ref
false
...
...
@@ -11,7 +11,7 @@ let set s =
seed
:=
Some
s
let
seed_file_name
label
=
Printf
.
sprintf
"sasa-%s.seed"
label
Printf
.
sprintf
"sasa-%s.seed"
label
(* for --replay *)
let
reset_the_seed_to_last
label
=
...
...
@@ -28,6 +28,8 @@ let reset_the_seed_to_last label =
flush
stderr
;
false
let
reset
()
=
seed
:=
None
let
rec
(
get
:
string
->
int
)
=
fun
label
->
match
!
seed
with
...
...
lib/sasacore/seed.mli
View file @
d9301991
(* Time-stamp: <modified the 2
0
/05/2021 (at
09
:2
5
) by Erwan Jahier> *)
(* Time-stamp: <modified the 2
1
/05/2021 (at
11
:2
9
) by Erwan Jahier> *)
val
set
:
int
->
unit
val
reset
:
unit
->
unit
(** The string is used to create a file name to save/restore the seed
when the --replay option is used *)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment