Thrill  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
source_node.hpp
Go to the documentation of this file.
1 /*******************************************************************************
2  * thrill/api/source_node.hpp
3  *
4  * Part of Project Thrill - http://project-thrill.org
5  *
6  * Copyright (C) 2016 Timo Bingmann <[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_SOURCE_NODE_HEADER
13 #define THRILL_API_SOURCE_NODE_HEADER
14 
15 #include <thrill/api/dia_node.hpp>
16 
17 namespace thrill {
18 namespace api {
19 
20 //! \ingroup api_layer
21 //! \{
22 
23 template <typename ValueType>
24 class SourceNode : public DIANode<ValueType>
25 {
26 public:
28 
29  SourceNode(Context& ctx, const char* label)
30  : Super(ctx, label, { /* parent_ids */ }, { /* parents */ })
31  { }
32 
33  //! SourceNodes generally do not Execute, they only PushData.
34  void Execute() override { }
35 };
36 
37 //! \}
38 
39 } // namespace api
40 } // namespace thrill
41 
42 #endif // !THRILL_API_SOURCE_NODE_HEADER
43 
44 /******************************************************************************/
SourceNode(Context &ctx, const char *label)
Definition: source_node.hpp:29
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:218
A DIANode is a typed node representing and operation in Thrill.
Definition: dia_node.hpp:37
virtual void Execute()=0
Virtual execution method. Triggers actual computation in sub-classes.