[Bf-blender-cvs] [3d2e279b3d8] functions: rename DataFlowGraph to just DataGraph

Jacques Lucke noreply at git.blender.org
Thu Aug 1 18:23:03 CEST 2019


Commit: 3d2e279b3d83dbee08c1c9f6d108ec080b4093b6
Author: Jacques Lucke
Date:   Thu Aug 1 13:30:13 2019 +0200
Branches: functions
https://developer.blender.org/rB3d2e279b3d83dbee08c1c9f6d108ec080b4093b6

rename DataFlowGraph to just DataGraph

===================================================================

M	source/blender/functions/CMakeLists.txt
M	source/blender/functions/FN_core.hpp
M	source/blender/functions/backends/dependencies/fgraph_dependencies.cpp
M	source/blender/functions/backends/llvm/fgraph_ir_generation.cpp
M	source/blender/functions/backends/tuple_call/fgraph_tuple_call.cpp
R076	source/blender/functions/core/data_flow_graph.cpp	source/blender/functions/core/data_graph.cpp
R096	source/blender/functions/core/data_flow_graph.hpp	source/blender/functions/core/data_graph.hpp
M	source/blender/functions/core/data_graph_builder.cpp
M	source/blender/functions/core/data_graph_builder.hpp
M	source/blender/functions/core/function_builder.cpp
M	source/blender/functions/core/function_builder.hpp
M	source/blender/functions/core/function_graph.hpp
M	source/blender/functions/frontends/data_flow_nodes/vtree_data_graph.hpp
M	source/blender/simulations/bparticles/inserters.cpp
M	source/blender/simulations/bparticles/particle_function_builder.cpp

===================================================================

diff --git a/source/blender/functions/CMakeLists.txt b/source/blender/functions/CMakeLists.txt
index 33fd6a662e4..bcf39703021 100644
--- a/source/blender/functions/CMakeLists.txt
+++ b/source/blender/functions/CMakeLists.txt
@@ -42,8 +42,8 @@ set(SRC
   core/function.cpp
   core/function_builder.hpp
   core/function_builder.cpp
-  core/data_flow_graph.hpp
-  core/data_flow_graph.cpp
+  core/data_graph.hpp
+  core/data_graph.cpp
   core/data_graph_builder.hpp
   core/data_graph_builder.cpp
   core/function_graph.hpp
diff --git a/source/blender/functions/FN_core.hpp b/source/blender/functions/FN_core.hpp
index 0804084ea3a..856a4f64813 100644
--- a/source/blender/functions/FN_core.hpp
+++ b/source/blender/functions/FN_core.hpp
@@ -6,5 +6,5 @@
 #include "core/function_builder.hpp"
 #include "core/source_info.hpp"
 #include "core/function_graph.hpp"
-#include "core/data_flow_graph.hpp"
+#include "core/data_graph.hpp"
 #include "core/data_graph_builder.hpp"
diff --git a/source/blender/functions/backends/dependencies/fgraph_dependencies.cpp b/source/blender/functions/backends/dependencies/fgraph_dependencies.cpp
index 00d337eaf9c..a55f14a3f09 100644
--- a/source/blender/functions/backends/dependencies/fgraph_dependencies.cpp
+++ b/source/blender/functions/backends/dependencies/fgraph_dependencies.cpp
@@ -5,7 +5,7 @@ namespace FN {
 class FGraphDependencies : public DepsBody {
  private:
   FunctionGraph m_fgraph;
-  SharedDataFlowGraph m_graph;
+  SharedDataGraph m_graph;
 
  public:
   FGraphDependencies(FunctionGraph &function_graph)
diff --git a/source/blender/functions/backends/llvm/fgraph_ir_generation.cpp b/source/blender/functions/backends/llvm/fgraph_ir_generation.cpp
index f49dc1d90ab..209d1e557a8 100644
--- a/source/blender/functions/backends/llvm/fgraph_ir_generation.cpp
+++ b/source/blender/functions/backends/llvm/fgraph_ir_generation.cpp
@@ -7,7 +7,7 @@ namespace FN {
 class BuildGraphIR : public LLVMBuildIRBody {
  private:
   FunctionGraph m_fgraph;
-  DataFlowGraph *m_graph;
+  DataGraph *m_graph;
   Set<DFGraphSocket> m_required_sockets;
 
  public:
diff --git a/source/blender/functions/backends/tuple_call/fgraph_tuple_call.cpp b/source/blender/functions/backends/tuple_call/fgraph_tuple_call.cpp
index 634e6fa8117..888bde78b16 100644
--- a/source/blender/functions/backends/tuple_call/fgraph_tuple_call.cpp
+++ b/source/blender/functions/backends/tuple_call/fgraph_tuple_call.cpp
@@ -7,7 +7,7 @@ namespace FN {
 
 using BLI::VectorAdaptor;
 
-static void try_ensure_tuple_call_bodies(SharedDataFlowGraph &graph)
+static void try_ensure_tuple_call_bodies(SharedDataGraph &graph)
 {
   for (uint node_id : graph->node_ids()) {
     SharedFunction &fn = graph->function_of_node(node_id);
@@ -28,7 +28,7 @@ static void try_ensure_tuple_call_bodies(SharedDataFlowGraph &graph)
 class ExecuteFGraph : public TupleCallBody {
  private:
   FunctionGraph m_fgraph;
-  DataFlowGraph *m_graph;
+  DataGraph *m_graph;
 
   struct NodeInfo {
     TupleCallBodyBase *body;
@@ -555,7 +555,7 @@ class ExecuteFGraph_Simple : public TupleCallBody {
  private:
   FunctionGraph m_fgraph;
   /* Just for easy access. */
-  DataFlowGraph *m_graph;
+  DataGraph *m_graph;
 
  public:
   ExecuteFGraph_Simple(FunctionGraph &function_graph)
diff --git a/source/blender/functions/core/data_flow_graph.cpp b/source/blender/functions/core/data_graph.cpp
similarity index 76%
rename from source/blender/functions/core/data_flow_graph.cpp
rename to source/blender/functions/core/data_graph.cpp
index 8ec4b46ba0e..ffe65393970 100644
--- a/source/blender/functions/core/data_flow_graph.cpp
+++ b/source/blender/functions/core/data_graph.cpp
@@ -2,11 +2,11 @@
 
 namespace FN {
 
-DataFlowGraph::DataFlowGraph(Vector<Node> nodes,
-                             Vector<InputSocket> inputs,
-                             Vector<OutputSocket> outputs,
-                             Vector<uint> targets,
-                             std::unique_ptr<MonotonicAllocator<>> source_info_allocator)
+DataGraph::DataGraph(Vector<Node> nodes,
+                     Vector<InputSocket> inputs,
+                     Vector<OutputSocket> outputs,
+                     Vector<uint> targets,
+                     std::unique_ptr<MonotonicAllocator<>> source_info_allocator)
     : m_nodes(std::move(nodes)),
       m_inputs(std::move(inputs)),
       m_outputs(std::move(outputs)),
@@ -15,7 +15,7 @@ DataFlowGraph::DataFlowGraph(Vector<Node> nodes,
 {
 }
 
-DataFlowGraph::~DataFlowGraph()
+DataGraph::~DataGraph()
 {
   for (Node node : m_nodes) {
     if (node.source_info != nullptr) {
@@ -24,7 +24,7 @@ DataFlowGraph::~DataFlowGraph()
   }
 }
 
-void DataFlowGraph::print_socket(DFGraphSocket socket) const
+void DataGraph::print_socket(DFGraphSocket socket) const
 {
   uint node_id = this->node_id_of_socket(socket);
   auto &node = m_nodes[node_id];
@@ -38,21 +38,21 @@ void DataFlowGraph::print_socket(DFGraphSocket socket) const
   std::cout << ":" << this->index_of_socket(socket) << ">";
 }
 
-std::string DataFlowGraph::to_dot()
+std::string DataGraph::to_dot()
 {
   DataGraphBuilder builder;
   this->insert_in_builder(builder);
   return builder.to_dot();
 }
 
-void DataFlowGraph::to_dot__clipboard()
+void DataGraph::to_dot__clipboard()
 {
   DataGraphBuilder builder;
   this->insert_in_builder(builder);
   builder.to_dot__clipboard();
 }
 
-void DataFlowGraph::insert_in_builder(DataGraphBuilder &builder)
+void DataGraph::insert_in_builder(DataGraphBuilder &builder)
 {
   Vector<BuilderNode *> builder_nodes;
 
diff --git a/source/blender/functions/core/data_flow_graph.hpp b/source/blender/functions/core/data_graph.hpp
similarity index 96%
rename from source/blender/functions/core/data_flow_graph.hpp
rename to source/blender/functions/core/data_graph.hpp
index 26a2e4fee67..d7ad132a2c8 100644
--- a/source/blender/functions/core/data_flow_graph.hpp
+++ b/source/blender/functions/core/data_graph.hpp
@@ -154,10 +154,10 @@ template<typename SequenceT> class DFGraphSocketSequence {
   }
 };
 
-class DataFlowGraph;
-using SharedDataFlowGraph = AutoRefCount<DataFlowGraph>;
+class DataGraph;
+using SharedDataGraph = AutoRefCount<DataGraph>;
 
-class DataFlowGraph : public RefCountedBase {
+class DataGraph : public RefCountedBase {
  public:
   struct Node {
     SharedFunction function;
@@ -204,14 +204,14 @@ class DataFlowGraph : public RefCountedBase {
   std::unique_ptr<MonotonicAllocator<>> m_source_info_allocator;
 
  public:
-  DataFlowGraph(Vector<Node> nodes,
-                Vector<InputSocket> inputs,
-                Vector<OutputSocket> outputs,
-                Vector<uint> targets,
-                std::unique_ptr<MonotonicAllocator<>> source_info_allocator);
-
-  DataFlowGraph(DataFlowGraph &other) = delete;
-  ~DataFlowGraph();
+  DataGraph(Vector<Node> nodes,
+            Vector<InputSocket> inputs,
+            Vector<OutputSocket> outputs,
+            Vector<uint> targets,
+            std::unique_ptr<MonotonicAllocator<>> source_info_allocator);
+
+  DataGraph(DataGraph &other) = delete;
+  ~DataGraph();
 
   Range<uint> node_ids() const
   {
diff --git a/source/blender/functions/core/data_graph_builder.cpp b/source/blender/functions/core/data_graph_builder.cpp
index 899ec7533f5..cfffcd57a54 100644
--- a/source/blender/functions/core/data_graph_builder.cpp
+++ b/source/blender/functions/core/data_graph_builder.cpp
@@ -88,36 +88,36 @@ void DataGraphBuilder::insert_link(BuilderOutputSocket *from, BuilderInputSocket
   m_link_counter++;
 }
 
-SharedDataFlowGraph DataGraphBuilder::build()
+SharedDataGraph DataGraphBuilder::build()
 {
   /* Every input socket should be linked to exactly one output. */
   BLI_assert(m_link_counter == m_input_socket_counter);
 
-  Vector<DataFlowGraph::Node> r_nodes;
+  Vector<DataGraph::Node> r_nodes;
   r_nodes.reserve(m_nodes.size());
-  Vector<DataFlowGraph::InputSocket> r_inputs;
+  Vector<DataGraph::InputSocket> r_inputs;
   r_inputs.reserve(m_input_socket_counter);
-  Vector<DataFlowGraph::OutputSocket> r_outputs;
+  Vector<DataGraph::OutputSocket> r_outputs;
   r_outputs.reserve(m_output_socket_counter);
   Vector<uint> r_targets;
   r_targets.reserve(m_link_counter);
 
   for (BuilderNode *builder_node : m_nodes) {
     uint node_id = builder_node->id();
-    r_nodes.append(DataFlowGraph::Node(std::move(builder_node->function()),
-                                       builder_node->source_info(),
-                                       r_inputs.size(),
-                                       r_outputs.size()));
+    r_nodes.append(DataGraph::Node(std::move(builder_node->function()),
+                                   builder_node->source_info(),
+                                   r_inputs.size(),
+                                   r_outputs.size()));
 
     for (BuilderInputSocket *builder_socket : builder_node->inputs()) {
       BLI_assert(builder_socket->origin() != nullptr);
       uint origin_id = builder_socket->origin()->output_id();
-      r_inputs.append(DataFlowGraph::InputSocket(node_id, origin_id));
+      r_inputs.append(DataGraph::InputSocket(node_id, origin_id));
     }
 
     for (BuilderOutputSocket *builder_socket : builder_node->outputs()) {
       auto targets = builder_socket->targets();
-      r_outputs.append(DataFlowGraph::OutputSocket(node_id, r_targets.size(), targets.size()));
+      r_outputs.append(DataGraph::OutputSocket(node_id, r_targets.size(), targets.size()));
 
       for (BuilderInputSocket *target : targets) {
         r_targets.append(target->input_id());
@@ -125,11 +125,11 @@ SharedDataFlowGraph DataGraphBuilder::build()
     }
   }
 
-  return SharedDataFlowGraph::New(std::move(r_nodes),
-                                  std::move(r_inputs),
-                                  std::move(r_outputs),
-                                  std::move(r_targets),
-                                  std::move(m_source_info_allocator));
+  return SharedDataGraph::New(std::move(r_nodes),
+                              std::move(r_inputs),
+                              std::move(r_outputs),
+                              std::move(r_targets),
+                              std::move(m_source_info_allocator));
 }
 
 }  // namespace FN
diff --git

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list