This commit introdues "link" helper which associates
GraphInput/GraphOutout with Pull/Push node, respectively.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
public:
Pull *node(void) const { return _pull; }
+ // DEPRECATED
+ //
+ // Use a dialect-specific helper instead.
void node(Pull *pull);
private:
public:
Push *node(void) const { return _push; }
+ // DEPRECATED
+ //
+ // Use a dialect-specific helper instead.
void node(Push *push);
private:
namespace loco
{
+class GraphInput;
+class GraphOutput;
+
// TODO Find a proper location for these declarations
using GraphInputIndex = uint32_t;
using GraphOutputIndex = uint32_t;
int64_t _index = -1; // Uninitialized
};
+void link(GraphOutput *, Push *push);
+
/**
* @brief Create a value from user data
*/
DataType _dtype = DataType::Unknown;
};
+void link(GraphInput *, Pull *pull);
+
/**
* @brief Create a new value identical to its input
*
return static_cast<GraphOutputIndex>(_index);
}
+void link(GraphOutput *output, Push *push) { output->node(push); }
+
} // namespace loco
/**
}
}
+void link(GraphInput *input, Pull *pull) { input->node(pull); }
+
} // namespace loco
/**