Difference between revisions of "Sync"

From Mesham
Jump to navigationJump to search
(Syntax)
Line 2: Line 2:
  
 
sync name;
 
sync name;
 +
 +
Where the optional ''name'' is a variable.
  
 
== Semantics ==
 
== Semantics ==
  
Will synchronise processes where they are needed. For instance, if using the asynchronous communication type, the programmer can synchronise with a variable name and the keyword will ensure all communications of that variable are up to date. One sided communication (variable sharing MPMD style in a par loop) is also linked into this keyword and it will ensure all communication is completed. Without a variable will synchronise all outstanding variables that need synchronising. If a process has no variables that need syncing then it will ignore this keyword and continue.
+
Will synchronise processes and acts as a blocking call involving all processes. This keyword is linked with default shared memory communication and other types. Omitting the variable name will result in synchronisation for all appropriate constructs. This can be thought of as a barrier, and the value of a variable can only be guaranteed after the appropriate barrier has completed.  
  
 
[[Category:Parallel]]
 
[[Category:Parallel]]

Revision as of 13:30, 12 January 2013

Syntax

sync name;

Where the optional name is a variable.

Semantics

Will synchronise processes and acts as a blocking call involving all processes. This keyword is linked with default shared memory communication and other types. Omitting the variable name will result in synchronisation for all appropriate constructs. This can be thought of as a barrier, and the value of a variable can only be guaranteed after the appropriate barrier has completed.