1 // 2 // Copyright © 2020 Arm Ltd. All rights reserved. 3 // SPDX-License-Identifier: MIT 4 // 5 %module pyarmnn_version 6 7 %include "std_string.i" 8 9 %{ 10 #define SWIG_FILE_WITH_INIT 11 #include "armnn/Version.hpp" 12 %} 13 14 %{ GetVersion()15 std::string GetVersion() 16 { 17 return ARMNN_VERSION; 18 }; 19 GetMajorVersion()20 std::string GetMajorVersion() 21 { 22 return STRINGIFY_VALUE(ARMNN_MAJOR_VERSION); 23 }; 24 GetMinorVersion()25 std::string GetMinorVersion() 26 { 27 return STRINGIFY_VALUE(ARMNN_MINOR_VERSION); 28 }; 29 %} 30 %feature("docstring", 31 " 32 Returns Arm NN library full version: MAJOR + MINOR + INCREMENTAL. 33 34 Returns: 35 str: Full version of Arm NN installed. 36 37 ") GetVersion; 38 std::string GetVersion(); 39 40 %feature("docstring", 41 " 42 Returns Arm NN library major version. 43 44 Returns: 45 str: Major version of Arm NN installed. 46 47 ") GetMajorVersion; 48 std::string GetMajorVersion(); 49 50 %feature("docstring", 51 " 52 Returns Arm NN library minor version. 53 54 Returns: 55 str: Minor version of Arm NN installed. 56 57 ") GetMinorVersion; 58 std::string GetMinorVersion(); 59