diff options
Diffstat (limited to 'python/pyarmnn/src/pyarmnn/swig/armnn_version.i')
-rw-r--r-- | python/pyarmnn/src/pyarmnn/swig/armnn_version.i | 58 |
1 files changed, 58 insertions, 0 deletions
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(); |