HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PDG_Mapper.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * COMMENTS:
7  */
8 
9 #ifndef __PDG_MAPPER_H__
10 #define __PDG_MAPPER_H__
11 
12 #include "PDG_API.h"
13 #include "PDG_Node.h"
14 
15 /**
16  * PDG_Node subclass that implements mapper-specific logic. This node can
17  * establish dependencies between upstream items and downstream static items.
18  */
19 class PDG_API PDG_Mapper : public PDG_Node
20 {
21 public:
22  using PDG_Node::PDG_Node;
23 
24  ~PDG_Mapper() override {}
25 
26  /// Returns the total memory usage of the node, including any work items
27  /// owned by it.
28  void memoryInfo(PDG_MemoryInfo& memory_info,
29  bool inclusive) const override;
30 
31 protected:
32  /// Adds dependencies on input nodes based on the current generation
33  /// settings
34  void addInputDeps(PDG_Node* input_node) override;
35 
36  /// Sets the loop depth and loop block reference on the node
37  int preCookLoop(
38  const UT_Array<LoopInfo>& begin_info) override;
39 
41  PDGE_Resolutions& resolutions,
42  const PDGE_Evaluator& evaluator,
43  PDGE_Dependency* dependency) override;
44 };
45 
46 #endif /* __PDG_MAPPER_H__ */
PDG_Node(PDG_GraphContext *context, const UT_StringHolder &name, const PDG_NodeCallbackType *type_object, PDG_NodeID id=-1)
#define PDG_API
Definition: PDG_API.h:23
~PDG_Mapper() override
Definition: PDG_Mapper.h:24
int preCookLoop()
Sets the loop depth and loop block reference on the node.
virtual void addInputDeps(PDG_Node *input_node)
virtual PDGE_Dependency::State evalResolve(PDGE_Resolutions &, const PDGE_Evaluator &, PDGE_Dependency *)
Called when a dependency owned by this object is resolved.
virtual void memoryInfo(PDG_MemoryInfo &memory_info, bool inclusive) const
Returns the memory usage as a PDG_MemoryInfo struct.