mirror of
https://gitlab.com/scemama/QCaml.git
synced 2024-12-22 04:13:33 +01:00
Fixed serial code
This commit is contained in:
parent
e9d3d9a1f4
commit
7c52629c6b
@ -37,6 +37,21 @@ module Node = struct
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
module InterNode = struct
|
||||||
|
|
||||||
|
let comm = None
|
||||||
|
|
||||||
|
let rank = 0
|
||||||
|
|
||||||
|
let master = true
|
||||||
|
|
||||||
|
let broadcast x = Lazy.force x
|
||||||
|
|
||||||
|
let barrier () = ()
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
module Vec = struct
|
module Vec = struct
|
||||||
|
|
||||||
type t =
|
type t =
|
||||||
|
@ -40,19 +40,37 @@ module Node : sig
|
|||||||
(** Always [None] *)
|
(** Always [None] *)
|
||||||
|
|
||||||
val rank : int
|
val rank : int
|
||||||
(** Rank of the current process in the node *)
|
(** Always zero *)
|
||||||
|
|
||||||
val master : bool
|
val master : bool
|
||||||
(** If true, master process of the node *)
|
(** Always true *)
|
||||||
|
|
||||||
val broadcast : 'a lazy_t -> 'a
|
val broadcast : 'a lazy_t -> 'a
|
||||||
(** Broadcasts data to all the processes of the current node. *)
|
(** Same as Lazy.force *)
|
||||||
|
|
||||||
val barrier : unit -> unit
|
val barrier : unit -> unit
|
||||||
(** Wait for all processes among the node to reach this point. *)
|
(** Does nothing. *)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
(** {5 Inter-node operations} *)
|
||||||
|
module InterNode : sig
|
||||||
|
|
||||||
|
val comm : 'a option
|
||||||
|
(** Always [None] *)
|
||||||
|
|
||||||
|
val rank : int
|
||||||
|
(** Always zero *)
|
||||||
|
|
||||||
|
val master : bool
|
||||||
|
(** Always true *)
|
||||||
|
|
||||||
|
val broadcast : 'a lazy_t -> 'a
|
||||||
|
(** Same as Lazy.force *)
|
||||||
|
|
||||||
|
val barrier : unit -> unit
|
||||||
|
(** Does nothing. *)
|
||||||
|
end
|
||||||
|
|
||||||
(** {5 Vector operations} *)
|
(** {5 Vector operations} *)
|
||||||
module Vec : sig
|
module Vec : sig
|
||||||
|
Loading…
Reference in New Issue
Block a user