Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
0ee27438
Commit
0ee27438
authored
Nov 13, 2012
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clarified the BSP spec
parent
c495350d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
7 deletions
+27
-7
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
...
@@ -35,6 +35,13 @@ namespace dlib
calls to bsp_listen() and one call to bsp_connect(). The call to
calls to bsp_listen() and one call to bsp_connect(). The call to
bsp_connect() then initiates the computation on all nodes.
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
THREAD SAFETY
This object is not thread-safe. In particular, you should only ever have
This object is not thread-safe. In particular, you should only ever have
...
@@ -124,6 +131,10 @@ namespace dlib
...
@@ -124,6 +131,10 @@ namespace dlib
to process by any node and there is no possibility of more being
to process by any node and there is no possibility of more being
generated until control is returned to the callers of receive
generated until control is returned to the callers of receive
methods.
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
throws
- dlib::socket_error:
- dlib::socket_error:
This exception is thrown if some error occurs which prevents us from
This exception is thrown if some error occurs which prevents us from
...
@@ -185,6 +196,10 @@ namespace dlib
...
@@ -185,6 +196,10 @@ namespace dlib
to process by any node and there is no possibility of more being
to process by any node and there is no possibility of more being
generated until control is returned to the callers of receive
generated until control is returned to the callers of receive
methods.
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
throws
- dlib::socket_error:
- dlib::socket_error:
This exception is thrown if some error occurs which prevents us from
This exception is thrown if some error occurs which prevents us from
...
@@ -227,14 +242,19 @@ namespace dlib
...
@@ -227,14 +242,19 @@ namespace dlib
);
);
/*!
/*!
ensures
ensures
- Wait for the following to all be true.
- Waits for the following to all be true:
- All other nodes are blocked on calls to receive() or have terminated.
- All other nodes were blocked on calls to receive(), try_receive(), or
have terminated.
- There are not any messages in flight between any nodes.
- There are not any messages in flight between any nodes.
- That is, if all the nodes had continued to block on receive() then
- That is, if all the nodes had continued to block on receive methods
they all would have blocked forever. Therefore, this function only
then they all would have blocked forever. Therefore, this function
returns once there are no more messages to process by any node and
only returns once there are no more messages to process by any node
there is no possibility of more being generated until control is
and there is no possibility of more being generated until control is
returned to the callers of receive().
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
throws
- dlib::socket_error:
- dlib::socket_error:
This exception is thrown if some error occurs which prevents us from
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