Skip to content

Commit cccb2d2

Browse files
authored
[oneTBB] Fix flow graph inaccuracies (#367)
* fix inaccuracy * fix spaces and reset * fix reset note Signed-off-by: ilya.mishin <[email protected]>
1 parent 65cf4a2 commit cccb2d2

File tree

8 files changed

+15
-12
lines changed

8 files changed

+15
-12
lines changed

source/elements/oneTBB/source/flow_graph/graph_cls.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ Member functions
6363
Resets the graph according to the specified flags.
6464
Flags to ``reset()`` can be combined with bitwise-``or``.
6565

66+
.. note::
67+
68+
``reset()`` is a thread-unsafe operation, don't call it concurrently.
69+
6670
.. cpp:function:: void cancel()
6771

6872
Cancels all tasks in the graph.

source/elements/oneTBB/source/flow_graph/indexer_node_cls.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ a reference to a specific input port.
6060
Member types
6161
------------
6262

63-
* ``input_ports_type`` is an alias to a tuple of input ports.
63+
* ``input_ports_type`` is an alias to a ``std::tuple`` of input ports.
6464
* ``output_type`` is an alias to the message of type ``tagged_msg``, which is sent to successors.
6565

6666
Member functions

source/elements/oneTBB/source/flow_graph/input_node_cls.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ result to all of its successors.
3434
3535
Requirements:
3636

37-
* The ``Output`` type must meet the `CopyConstructible` requirements from [copyconstructible] and
37+
* The ``Output`` type must meet the `DefaultConstructible` requirements from [defaultconstructible], `CopyConstructible` requirements from [copyconstructible] and
3838
`CopyAssignable` requirements from [copyassignable] ISO C++ Standard sections.
3939
* The type ``Body`` must meet the :doc:`InputNodeBody requirements <../named_requirements/flow_graph/input_node_body>`.
4040

source/elements/oneTBB/source/flow_graph/message_flow_graph_example.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ the figure below.
1919
Each value enters through the ``broadcast_node<int>`` ``input``. This node broadcasts the value to both
2020
``squarer`` and ``cuber``, which calculate ``x*x`` and ``x*x*x``, respectively. The output of each
2121
of these nodes is put to one of ``join``'s ports. A tuple containing both values is
22-
created by ``join_node< tuple<int,int> > join`` and forwarded to ``summer``, which adds both
22+
created by ``join_node<std::tuple<int,int>> join`` and forwarded to ``summer``, which adds both
2323
values to the running total. Both ``squarer`` and ``cuber`` allow unlimited concurrency, that is they each
2424
may process multiple values simultaneously. The final ``summer``, which updates a shared total, is only allowed
2525
to process a single incoming tuple at a time, eliminating the need for a lock around the shared value.
@@ -43,7 +43,7 @@ to process a single incoming tuple at a time, eliminating the need for a lock ar
4343
int &my_sum;
4444
public:
4545
sum( int &s ) : my_sum(s) {}
46-
int operator()( tuple< int, int > v ) {
46+
int operator()( std::tuple<int, int> v ) {
4747
my_sum += get<0>(v) + get<1>(v);
4848
return my_sum;
4949
}
@@ -56,8 +56,8 @@ to process a single incoming tuple at a time, eliminating the need for a lock ar
5656
broadcast_node<int> input(g);
5757
function_node<int,int> squarer( g, unlimited, square() );
5858
function_node<int,int> cuber( g, unlimited, cube() );
59-
join_node< tuple<int,int>, queueing > join( g );
60-
function_node<tuple<int,int>,int>
59+
join_node<std::tuple<int,int>, queueing> join( g );
60+
function_node<std::tuple<int,int>,int>
6161
summer( g, serial, sum(result) );
6262
6363
make_edge( input, squarer );

source/elements/oneTBB/source/flow_graph/multifunc_node_cls.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ used to obtain an updated copy.
6565
Member types
6666
------------
6767

68-
``output_ports_type`` is an alias to a tuple of output ports.
68+
``output_ports_type`` is an alias to a ``std::tuple`` of output ports.
6969

7070
Member functions
7171
----------------
@@ -131,4 +131,4 @@ it.
131131
132132
output_ports_type& output_ports();
133133
134-
**Returns:** a tuple of output ports.
134+
**Returns:** a ``std::tuple`` of output ports.

source/elements/oneTBB/source/flow_graph/overwrite_node_cls.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Member functions
6060
.. cpp:function:: overwrite_node( const overwrite_node &src )
6161

6262
Constructs an object of type ``overwrite_node`` that belongs to the graph ``g`` with an invalid
63-
internal buffer item. The buffered value and list of successors are not copied from ``src``.
63+
internal buffer item. The buffered value and list of successors and predecessors are not copied from ``src``.
6464

6565
.. cpp:function:: ~overwrite_node( )
6666

source/elements/oneTBB/source/flow_graph/priority_queue_node_cls.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ A class template that forwards messages in a priority order.
1919
template< typename T, typename Compare = std::less<T>>
2020
class priority_queue_node : public graph_node, public receiver<T>, public sender<T> {
2121
public:
22-
typedef size_t size_type;
2322
explicit priority_queue_node( graph &g );
2423
priority_queue_node( const priority_queue_node &src );
2524
~priority_queue_node();

source/elements/oneTBB/source/flow_graph/split_node_cls.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ split_node
77
==========
88
**[flow_graph.split_node]**
99

10-
A ``split_node`` sends each element of the incoming tuple to the output port that matches the element index
10+
A ``split_node`` sends each element of the incoming ``std::tuple`` to the output port that matches the element index
1111
in the incoming tuple.
1212

1313
.. code:: cpp
@@ -76,4 +76,4 @@ Member functions
7676

7777
.. cpp:function:: output_ports_type& output_ports()
7878

79-
**Returns**: a tuple of output ports.
79+
**Returns**: a ``std::tuple`` of output ports.

0 commit comments

Comments
 (0)