Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
0ee27438
Commit
0ee27438
authored
Nov 12, 2012
by
Davis King
Browse files
clarified the BSP spec
parent
c495350d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
7 deletions
+27
-7
dlib/bsp/bsp_abstract.h
dlib/bsp/bsp_abstract.h
+27
-7
No files found.
dlib/bsp/bsp_abstract.h
View file @
0ee27438
...
...
@@ -35,6 +35,13 @@ namespace dlib
calls to bsp_listen() and one call to bsp_connect(). The call to
bsp_connect() then initiates the computation on all nodes.
Finally, note that there is no explicit barrier synchronization function
you call at the end of step 3. Instead, you can simply call a method such
as try_receive() until it returns false. That is, the bsp_context's
receive methods incorporate a barrier synchronization that happens once all
the BSP nodes are blocked on receive calls and there are no more messages
in flight.
THREAD SAFETY
This object is not thread-safe. In particular, you should only ever have
...
...
@@ -124,6 +131,10 @@ namespace dlib
to process by any node and there is no possibility of more being
generated until control is returned to the callers of receive
methods.
- When one BSP node's receive method returns because of the above
conditions then all of them will also return. That is, it is NOT the
case that just a subset of BSP nodes unblock. Moreover, they all
unblock at the same time.
throws
- dlib::socket_error:
This exception is thrown if some error occurs which prevents us from
...
...
@@ -185,6 +196,10 @@ namespace dlib
to process by any node and there is no possibility of more being
generated until control is returned to the callers of receive
methods.
- When one BSP node's receive method returns because of the above
conditions then all of them will also return. That is, it is NOT the
case that just a subset of BSP nodes unblock. Moreover, they all
unblock at the same time.
throws
- dlib::socket_error:
This exception is thrown if some error occurs which prevents us from
...
...
@@ -227,14 +242,19 @@ namespace dlib
);
/*!
ensures
- Wait for the following to all be true.
- All other nodes are blocked on calls to receive() or have terminated.
- Waits for the following to all be true:
- All other nodes were blocked on calls to receive(), try_receive(), or
have terminated.
- There are not any messages in flight between any nodes.
- That is, if all the nodes had continued to block on receive() then
they all would have blocked forever. Therefore, this function only
returns once there are no more messages to process by any node and
there is no possibility of more being generated until control is
returned to the callers of receive().
- That is, if all the nodes had continued to block on receive methods
then they all would have blocked forever. Therefore, this function
only returns once there are no more messages to process by any node
and there is no possibility of more being generated until control is
returned to the callers of receive methods.
- When one BSP node's receive method returns because of the above
conditions then all of them will also return. That is, it is NOT the
case that just a subset of BSP nodes unblock. Moreover, they all unblock
at the same time.
throws
- dlib::socket_error:
This exception is thrown if some error occurs which prevents us from
...
...
Write
Preview
Markdown
is supported
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