diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/armnn/DllExport.hpp | 19 | ||||
-rw-r--r-- | src/armnn/WallClockTimer.hpp | 3 | ||||
-rw-r--r-- | src/profiling/LabelsAndEventClasses.hpp | 45 |
3 files changed, 44 insertions, 23 deletions
diff --git a/src/armnn/DllExport.hpp b/src/armnn/DllExport.hpp new file mode 100644 index 0000000000..227028c9b7 --- /dev/null +++ b/src/armnn/DllExport.hpp @@ -0,0 +1,19 @@ +// +// Copyright © 2020 Arm Ltd. All rights reserved. +// SPDX-License-Identifier: MIT +// +#pragma once + +#if defined (_MSC_VER) + +#ifdef ARMNN_COMPILING_DLL +#define ARMNN_DLLEXPORT __declspec(dllexport) +#else +#define ARMNN_DLLEXPORT __declspec(dllimport) +#endif + +#else + +#define ARMNN_DLLEXPORT + +#endif
\ No newline at end of file diff --git a/src/armnn/WallClockTimer.hpp b/src/armnn/WallClockTimer.hpp index ff17d79e92..23e1bc689b 100644 --- a/src/armnn/WallClockTimer.hpp +++ b/src/armnn/WallClockTimer.hpp @@ -7,6 +7,7 @@ #include "Instrument.hpp" #include <chrono> +#include "DllExport.hpp" namespace armnn { @@ -59,7 +60,7 @@ public: using clock = std::chrono::steady_clock; #endif - static const std::string WALL_CLOCK_TIME; + ARMNN_DLLEXPORT static const std::string WALL_CLOCK_TIME; static const std::string WALL_CLOCK_TIME_START; static const std::string WALL_CLOCK_TIME_STOP; diff --git a/src/profiling/LabelsAndEventClasses.hpp b/src/profiling/LabelsAndEventClasses.hpp index 69cee9aaea..fa125490cc 100644 --- a/src/profiling/LabelsAndEventClasses.hpp +++ b/src/profiling/LabelsAndEventClasses.hpp @@ -8,6 +8,7 @@ #include "ProfilingGuidGenerator.hpp" #include <armnn/Types.hpp> +#include <DllExport.hpp> namespace armnn { @@ -19,32 +20,32 @@ class LabelsAndEventClasses { public: // Labels (string value + GUID) - static std::string NAME_LABEL; - static std::string TYPE_LABEL; - static std::string INDEX_LABEL; - static std::string BACKENDID_LABEL; - static ProfilingStaticGuid NAME_GUID; - static ProfilingStaticGuid TYPE_GUID; - static ProfilingStaticGuid INDEX_GUID; - static ProfilingStaticGuid BACKENDID_GUID; + ARMNN_DLLEXPORT static std::string NAME_LABEL; + ARMNN_DLLEXPORT static std::string TYPE_LABEL; + ARMNN_DLLEXPORT static std::string INDEX_LABEL; + ARMNN_DLLEXPORT static std::string BACKENDID_LABEL; + ARMNN_DLLEXPORT static ProfilingStaticGuid NAME_GUID; + ARMNN_DLLEXPORT static ProfilingStaticGuid TYPE_GUID; + ARMNN_DLLEXPORT static ProfilingStaticGuid INDEX_GUID; + ARMNN_DLLEXPORT static ProfilingStaticGuid BACKENDID_GUID; // Common types - static std::string LAYER; - static std::string WORKLOAD; - static std::string NETWORK; - static std::string CONNECTION; - static std::string INFERENCE; - static std::string WORKLOAD_EXECUTION; - static ProfilingStaticGuid LAYER_GUID; - static ProfilingStaticGuid WORKLOAD_GUID; - static ProfilingStaticGuid NETWORK_GUID; - static ProfilingStaticGuid CONNECTION_GUID; - static ProfilingStaticGuid INFERENCE_GUID; - static ProfilingStaticGuid WORKLOAD_EXECUTION_GUID; + ARMNN_DLLEXPORT static std::string LAYER; + ARMNN_DLLEXPORT static std::string WORKLOAD; + ARMNN_DLLEXPORT static std::string NETWORK; + ARMNN_DLLEXPORT static std::string CONNECTION; + ARMNN_DLLEXPORT static std::string INFERENCE; + ARMNN_DLLEXPORT static std::string WORKLOAD_EXECUTION; + ARMNN_DLLEXPORT static ProfilingStaticGuid LAYER_GUID; + ARMNN_DLLEXPORT static ProfilingStaticGuid WORKLOAD_GUID; + ARMNN_DLLEXPORT static ProfilingStaticGuid NETWORK_GUID; + ARMNN_DLLEXPORT static ProfilingStaticGuid CONNECTION_GUID; + ARMNN_DLLEXPORT static ProfilingStaticGuid INFERENCE_GUID; + ARMNN_DLLEXPORT static ProfilingStaticGuid WORKLOAD_EXECUTION_GUID; // Event Class GUIDs - static ProfilingStaticGuid ARMNN_PROFILING_SOL_EVENT_CLASS; - static ProfilingStaticGuid ARMNN_PROFILING_EOL_EVENT_CLASS; + ARMNN_DLLEXPORT static ProfilingStaticGuid ARMNN_PROFILING_SOL_EVENT_CLASS; + ARMNN_DLLEXPORT static ProfilingStaticGuid ARMNN_PROFILING_EOL_EVENT_CLASS; private: static ProfilingGuidGenerator m_GuidGenerator; |