leon 1 month ago
parent
commit
d88874063a
2 changed files with 62 additions and 5 deletions
  1. 57 0
      .vscode/settings.json
  2. 5 5
      src/nodes/base/base.hpp

+ 57 - 0
.vscode/settings.json

@@ -0,0 +1,57 @@
+{
+    "files.associations": {
+        "*.cu": "cuda-cpp",
+        "__bit_reference": "cpp",
+        "__hash_table": "cpp",
+        "__locale": "cpp",
+        "__node_handle": "cpp",
+        "__split_buffer": "cpp",
+        "__tree": "cpp",
+        "__verbose_abort": "cpp",
+        "array": "cpp",
+        "bitset": "cpp",
+        "cctype": "cpp",
+        "charconv": "cpp",
+        "clocale": "cpp",
+        "cmath": "cpp",
+        "condition_variable": "cpp",
+        "cstdarg": "cpp",
+        "cstddef": "cpp",
+        "cstdint": "cpp",
+        "cstdio": "cpp",
+        "cstdlib": "cpp",
+        "cstring": "cpp",
+        "ctime": "cpp",
+        "cwchar": "cpp",
+        "cwctype": "cpp",
+        "deque": "cpp",
+        "execution": "cpp",
+        "memory": "cpp",
+        "forward_list": "cpp",
+        "initializer_list": "cpp",
+        "ios": "cpp",
+        "iosfwd": "cpp",
+        "iostream": "cpp",
+        "istream": "cpp",
+        "limits": "cpp",
+        "locale": "cpp",
+        "map": "cpp",
+        "mutex": "cpp",
+        "new": "cpp",
+        "optional": "cpp",
+        "print": "cpp",
+        "queue": "cpp",
+        "ratio": "cpp",
+        "sstream": "cpp",
+        "stack": "cpp",
+        "stdexcept": "cpp",
+        "streambuf": "cpp",
+        "string": "cpp",
+        "string_view": "cpp",
+        "typeinfo": "cpp",
+        "unordered_map": "cpp",
+        "variant": "cpp",
+        "vector": "cpp",
+        "algorithm": "cpp"
+    }
+}

+ 5 - 5
src/nodes/base/base.hpp

@@ -33,13 +33,13 @@ public:
     void start();
     void stop();
 
-    inline void add_input_buffer(const std::string& name, SharedQueue buffer)
+    inline void add_input_buffer(const std::string& name, SharedQueue<std::shared_ptr<meta::MetaData>> buffer)
     {
         std::unique_lock<std::mutex> lock(mutex_);
         input_buffers_[name] = buffer;
     }
 
-    inline void add_output_buffer(const std::string& name, SharedQueue buffer)
+    inline void add_output_buffer(const std::string& name, SharedQueue<std::shared_ptr<meta::MetaData>> buffer)
     {
         std::unique_lock<std::mutex> lock(mutex_);
         output_buffers_[name] = buffer;
@@ -90,9 +90,9 @@ protected:
 static inline void LinkNode(const std::shared_ptr<BaseNode> &front,
     const std::shared_ptr<BaseNode> &back) 
 {
-    auto queue = std::make_shared<SharedQueue>();
-    back->add_input(front->get_name(), queue);
-    front->add_output(back->get_name(), queue);
+    auto queue = std::make_shared<SharedQueue<std::shared_ptr<meta::MetaData>>>();
+    back->add_input_buffer(front->get_name(), queue);
+    front->add_output_buffer(back->get_name(), queue);
 }