Module Mspmlcomm


module Mspmlcomm: sig  end
Communication functions

val shift : int -> 'a Mspml.par -> 'a Mspml.par
val shift_right : 'a Mspml.par -> 'a Mspml.par
val shift_left : 'a Mspml.par -> 'a Mspml.par
Shifts the values from processes to processes. The parallel cost is n*g+l where n is the average size of the values.
val totex : 'a Mspml.par -> (int -> 'a) Mspml.par
val totex_list : 'a Mspml.par -> 'a list Mspml.par
val totex_array : 'a Mspml.par -> 'a array Mspml.par
totex <v0,...,vp-1> evaluates to <f0,...,fp-1> such as (fi j)=vj. totex_list <v0,...,vp-1> evaluates to <l0,...,lp-1> such as the jth element of li is vj. totex_array does the same thing but for arrays.
val scatter : ('a -> int -> 'b) -> ('a -> int -> 'b) -> int -> 'a Mspml.par -> 'b Mspml.par
scatter partition nothing root vec applies the function partition at the data held at process root to create a function which indicates which part of the initial data will be send to the processe which will request it. nothing is applied to the datas of processes which will not send their values. The parts held at process root are then scattered to all processes.
val bcast_direct : int -> 'a Mspml.par -> 'a Mspml.par
bcast_direct root v0,...,vp-1=vn,...,vn. The parallel cost is size*(p-1)*g+l, where size is the size of the value vroot.
val generic_bcast_totex : ('a -> int -> 'b) ->
('a -> int -> 'b) ->
((int -> 'b) -> 'c) -> int -> 'a Mspml.par -> 'c Mspml.par
generic_bcast_totex part noth gather root vec scatters the value held by process root in vector vec. Then a total exchange is performed. The parts are combined to retrieve the initial value using the function gather
val bcast_totex_string : int -> string Mspml.par -> string Mspml.par
val bcast_totex : int -> 'a Mspml.par -> 'a Mspml.par
bcast_totex root vec marshals the values of vec then uses bcast_totex_string to broadcast the string and then unmarshalls it.
val fold_direct : ('a -> 'b -> 'a) -> 'a -> 'b Mspml.par -> 'a Mspml.par
fold_direct op neutral <v0, ... , vp-1> = <s , ... , s> where s = op neutral (op^ v0 (op v1 ...)).
val generic_wide_fold : ('a -> 'b -> 'c -> 'd) ->
('a -> 'b -> 'd Mspml.par -> 'e) -> 'a -> 'b -> 'c Mspml.par -> 'e
generice_wide_fold sfold fold op neutral vec does a parallel fold on a parallel vector of collection using the sequential fold sfold, the parallel fold fold with operator op with neutral neutral.
val wide_fold_list_direct : ('a -> 'a -> 'a) -> 'a -> 'a list Mspml.par -> 'a Mspml.par
val wide_fold_array_direct : ('a -> 'a -> 'a) -> 'a -> 'a array Mspml.par -> 'a Mspml.par
Instantiations for lists and arrays with direct parallel fold.
val generic_scan : (('a -> 'b) -> 'c -> 'd -> 'e) ->
(('a -> 'b) -> 'c -> 'f Mspml.par -> 'a Mspml.par) ->
('b -> 'g -> 'h) ->
('e -> 'f option * 'g) ->
('e -> 'f option * 'g) -> ('a -> 'b) -> 'c -> 'd Mspml.par -> 'h Mspml.par
generic_scan operates on a parallel vector of collections of indexed elements. It depends on:
val prescan_direct : ('a -> 'b -> 'a) -> 'a -> 'b Mspml.par -> 'a Mspml.par
pscan_direct op e <v1,...,vp> = <e,v1, ... , op (...) vp-1>