Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions source/elements/oneTBB/source/flow_graph/graph_cls.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Member functions

Resets the graph according to the specified flags.
Flags to ``reset()`` can be combined with bitwise-``or``.
Note: ``reset()`` is thread-unsafe operation, don't use it in concurrent environment

.. cpp:function:: void cancel()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ a reference to a specific input port.
Member types
------------

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

Member functions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ result to all of its successors.

Requirements:

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ the figure below.
Each value enters through the ``broadcast_node<int>`` ``input``. This node broadcasts the value to both
``squarer`` and ``cuber``, which calculate ``x*x`` and ``x*x*x``, respectively. The output of each
of these nodes is put to one of ``join``'s ports. A tuple containing both values is
created by ``join_node< tuple<int,int> > join`` and forwarded to ``summer``, which adds both
created by ``join_node< std::tuple<int,int> > join`` and forwarded to ``summer``, which adds both
values to the running total. Both ``squarer`` and ``cuber`` allow unlimited concurrency, that is they each
may process multiple values simultaneously. The final ``summer``, which updates a shared total, is only allowed
to process a single incoming tuple at a time, eliminating the need for a lock around the shared value.
Expand All @@ -43,7 +43,7 @@ to process a single incoming tuple at a time, eliminating the need for a lock ar
int &my_sum;
public:
sum( int &s ) : my_sum(s) {}
int operator()( tuple< int, int > v ) {
int operator()( std::tuple< int, int > v ) {
my_sum += get<0>(v) + get<1>(v);
return my_sum;
}
Expand All @@ -56,8 +56,8 @@ to process a single incoming tuple at a time, eliminating the need for a lock ar
broadcast_node<int> input(g);
function_node<int,int> squarer( g, unlimited, square() );
function_node<int,int> cuber( g, unlimited, cube() );
join_node< tuple<int,int>, queueing > join( g );
function_node<tuple<int,int>,int>
join_node< std::tuple<int,int>, queueing > join( g );
function_node<std::tuple<int,int>,int>
summer( g, serial, sum(result) );

make_edge( input, squarer );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ used to obtain an updated copy.
Member types
------------

``output_ports_type`` is an alias to a tuple of output ports.
``output_ports_type`` is an alias to a ``std::tuple`` of output ports.

Member functions
----------------
Expand Down Expand Up @@ -131,4 +131,4 @@ it.

output_ports_type& output_ports();

**Returns:** a tuple of output ports.
**Returns:** a ``std::tuple`` of output ports.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Member functions
.. cpp:function:: overwrite_node( const overwrite_node &src )

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

.. cpp:function:: ~overwrite_node( )

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ A class template that forwards messages in a priority order.
template< typename T, typename Compare = std::less<T>>
class priority_queue_node : public graph_node, public receiver<T>, public sender<T> {
public:
typedef size_t size_type;
explicit priority_queue_node( graph &g );
priority_queue_node( const priority_queue_node &src );
~priority_queue_node();
Expand Down
4 changes: 2 additions & 2 deletions source/elements/oneTBB/source/flow_graph/split_node_cls.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ split_node
==========
**[flow_graph.split_node]**

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

.. code:: cpp
Expand Down Expand Up @@ -76,4 +76,4 @@ Member functions

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

**Returns**: a tuple of output ports.
**Returns**: a ``std::tuple`` of output ports.