From 5c2fb3f34462632b99331e2cc2d964c99fc1782b Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Tue, 1 May 2018 15:26:20 +0100 Subject: COMPMID-997: Add support for node's name in GraphAPI. Change-Id: I0ca02e42807c1ad9afeffb7202a3556feb11442f Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/129701 Tested-by: Jenkins Reviewed-by: Anthony Barbier Reviewed-by: Georgios Pinitas --- arm_compute/graph/frontend/ILayer.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'arm_compute/graph/frontend/ILayer.h') diff --git a/arm_compute/graph/frontend/ILayer.h b/arm_compute/graph/frontend/ILayer.h index 5add8ab440..f7caaea47d 100644 --- a/arm_compute/graph/frontend/ILayer.h +++ b/arm_compute/graph/frontend/ILayer.h @@ -46,6 +46,28 @@ public: * @return ID of the created node. */ virtual NodeID create_layer(IStream &s) = 0; + /** Sets the name of the layer + * + * @param[in] name Name of the layer + * + * @return The layer object + */ + ILayer &set_name(std::string name) + { + _name = name; + return *this; + } + /** Layer name accessor + * + * @return Returns the name of the layer + */ + const std::string &name() const + { + return _name; + } + +private: + std::string _name = {}; }; } // namespace frontend } // namespace graph -- cgit v1.2.1