diff --git a/include/tim/vx/graph.h b/include/tim/vx/graph.h index cd17ef0..fb43bb3 100644 --- a/include/tim/vx/graph.h +++ b/include/tim/vx/graph.h @@ -33,6 +33,8 @@ namespace vx { class Tensor; class TensorSpec; +class Operation; + class Graph { public: virtual ~Graph() {} @@ -54,8 +56,13 @@ class Graph { template std::shared_ptr CreateOperation(Params... parameters) { - return std::make_shared(this, parameters...); + auto op = std::make_shared(this, parameters...); + opVector.push_back(op); + return op; } + +private: + std::vector> opVector; }; } // namespace vx