From ba5fad356a926d5e1c6e0fe6b546a310230cc5a8 Mon Sep 17 00:00:00 2001 From: Matthew Sloyan Date: Mon, 26 Sep 2022 13:31:43 +0100 Subject: Add IModelRunner interface to TOSA Reference Model * Added IModelRunner interface using pimpl idiom, which allows a user to initialize, configure and run the model. * Added unit tests for IModelRunner. * Added doctest as third-party submodule. * Added user options to specify paths for dependencies. * Moved general func_config functions to separate utility, which removes cxxopts dependency. Signed-off-by: Matthew Sloyan Change-Id: If42f1f82cd6dadf18911a48dcd5fa579b719aff2 --- reference_model/src/tensor.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'reference_model/src/tensor.h') diff --git a/reference_model/src/tensor.h b/reference_model/src/tensor.h index ede42a9..6b7d5f1 100644 --- a/reference_model/src/tensor.h +++ b/reference_model/src/tensor.h @@ -228,6 +228,16 @@ public: virtual int writeToNpyFile(const char* filename) const; virtual int copyValueFrom(Tensor* tensor) = 0; + virtual int readfromVector(const std::vector& vals); + virtual int readfromVector(const std::vector& vals); + virtual int readfromVector(const std::vector& vals); + virtual int readfromVector(const std::vector& vals); + + virtual int writeToVector(std::vector& vals); + virtual int writeToVector(std::vector& vals); + virtual int writeToVector(std::vector& vals); + virtual int writeToVector(std::vector& vals); + const char* bool_to_str(bool in) const { static const char* true_str = "true"; -- cgit v1.2.1