Thrill  0.1
dop_node.hpp
Go to the documentation of this file.
1 /*******************************************************************************
2  * thrill/api/dop_node.hpp
3  *
4  * Part of Project Thrill - http://project-thrill.org
5  *
6  * Copyright (C) 2015 Sebastian Lamm <[email protected]>
7  *
8  * All rights reserved. Published under the BSD-2 license in the LICENSE file.
9  ******************************************************************************/
10 
11 #pragma once
12 #ifndef THRILL_API_DOP_NODE_HEADER
13 #define THRILL_API_DOP_NODE_HEADER
14 
15 #include <thrill/api/dia_node.hpp>
16 
17 #include <vector>
18 
19 namespace thrill {
20 namespace api {
21 
22 //! \ingroup api_layer
23 //! \{
24 
25 /*!
26  * A DOpNode is a typed node representing and distributed operations in Thrill.
27  * It is the super class for all distributed operation nodes.
28  *
29  * \tparam ValueType Type of the items in the DIA.
30  */
31 template <typename ValueType>
32 class DOpNode : public DIANode<ValueType>
33 {
34 public:
36 
37  /*!
38  * Constructor for a DOpNode, which sets references to the
39  * parent nodes. Calls the constructor of DIANode with the same parameters.
40  *
41  * \param ctx Reference to Context, which holds references to data and
42  * network.
43  *
44  * \param label static label of DOp implementation
45  *
46  * \param parent_ids parent DIA ids
47  *
48  * \param parents Reference to parents of this node, which have to be
49  * computed previously
50  */
51  DOpNode(Context& ctx, const char* label,
52  const std::initializer_list<size_t>& parent_ids,
53  const std::initializer_list<DIABasePtr>& parents)
54  : Super(ctx, label, parent_ids, parents) { }
55 
56  /*!
57  * Constructor for a DOpNode, which sets references to the
58  * parent nodes. Calls the constructor of DIANode with the same parameters.
59  *
60  * \param ctx Reference to Context, which holds references to data and
61  * network.
62  *
63  * \param label static label of DOp implementation
64  *
65  * \param parent_ids parent DIA ids
66  *
67  * \param parents Reference to parents of this node, which have to be
68  * computed previously
69  */
70  DOpNode(Context& ctx, const char* label,
71  std::vector<size_t>&& parent_ids,
72  std::vector<DIABasePtr>&& parents)
73  : Super(ctx, label, std::move(parent_ids), std::move(parents)) { }
74 };
75 
76 //! \}
77 
78 } // namespace api
79 } // namespace thrill
80 
81 #endif // !THRILL_API_DOP_NODE_HEADER
82 
83 /******************************************************************************/
DOpNode(Context &ctx, const char *label, const std::initializer_list< size_t > &parent_ids, const std::initializer_list< DIABasePtr > &parents)
Constructor for a DOpNode, which sets references to the parent nodes.
Definition: dop_node.hpp:51
std::vector< size_t > parent_ids() const
Returns the parents of this DIABase.
Definition: dia_base.hpp:258
const std::vector< DIABasePtr > & parents() const
Returns the parents of this DIABase.
Definition: dia_base.hpp:253
STL namespace.
const char * label() const
return label() of DIANode subclass as stored by StatsNode
Definition: dia_base.hpp:218
The Context of a job is a unique instance per worker which holds references to all underlying parts o...
Definition: context.hpp:221
A DIANode is a typed node representing and operation in Thrill.
Definition: dia_node.hpp:37
DOpNode(Context &ctx, const char *label, std::vector< size_t > &&parent_ids, std::vector< DIABasePtr > &&parents)
Constructor for a DOpNode, which sets references to the parent nodes.
Definition: dop_node.hpp:70
A DOpNode is a typed node representing and distributed operations in Thrill.
Definition: dop_node.hpp:32