From 245d64c60d0ea30f5080ff53225b5169927e24d6 Mon Sep 17 00:00:00 2001 From: Matthew Bentham Date: Mon, 2 Dec 2019 12:59:43 +0000 Subject: Work in progress of python bindings for Arm NN Not built or tested in any way Signed-off-by: Matthew Bentham Change-Id: Ie7f92b529aa5087130f0c5cc8c17db1581373236 --- python/pyarmnn/src/pyarmnn/swig/armnn_version.i | 58 +++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 python/pyarmnn/src/pyarmnn/swig/armnn_version.i (limited to 'python/pyarmnn/src/pyarmnn/swig/armnn_version.i') diff --git a/python/pyarmnn/src/pyarmnn/swig/armnn_version.i b/python/pyarmnn/src/pyarmnn/swig/armnn_version.i new file mode 100644 index 0000000000..b8e760d435 --- /dev/null +++ b/python/pyarmnn/src/pyarmnn/swig/armnn_version.i @@ -0,0 +1,58 @@ +// +// Copyright © 2017 Arm Ltd. All rights reserved. +// SPDX-License-Identifier: MIT +// +%module pyarmnn_version + +%include "std_string.i" + +%{ +#define SWIG_FILE_WITH_INIT +#include "armnn/Version.hpp" +%} + +%{ + std::string GetVersion() + { + return ARMNN_VERSION; + }; + + std::string GetMajorVersion() + { + return STRINGIFY_VALUE(ARMNN_MAJOR_VERSION); + }; + + std::string GetMinorVersion() + { + return STRINGIFY_VALUE(ARMNN_MINOR_VERSION); + }; +%} +%feature("docstring", +" + Returns Arm NN library full version: MAJOR + MINOR + INCREMENTAL. + + Returns: + str: Full version of Arm NN installed. + +") GetVersion; +std::string GetVersion(); + +%feature("docstring", +" + Returns Arm NN library major version. The year of the release. + + Returns: + str: Major version of Arm NN installed. + +") GetMajorVersion; +std::string GetMajorVersion(); + +%feature("docstring", +" + Returns Arm NN library minor version. Month of the year of the release. + + Returns: + str: Minor version of Arm NN installed. + +") GetMinorVersion; +std::string GetMinorVersion(); -- cgit v1.2.1