aboutsummaryrefslogtreecommitdiff
path: root/include/armnn/IProfiler.hpp
diff options
context:
space:
mode:
authortelsoa01 <telmo.soares@arm.com>2018-08-31 09:22:23 +0100
committertelsoa01 <telmo.soares@arm.com>2018-08-31 09:22:23 +0100
commitc577f2c6a3b4ddb6ba87a882723c53a248afbeba (patch)
treebd7d4c148df27f8be6649d313efb24f536b7cf34 /include/armnn/IProfiler.hpp
parent4c7098bfeab1ffe1cdc77f6c15548d3e73274746 (diff)
downloadarmnn-c577f2c6a3b4ddb6ba87a882723c53a248afbeba.tar.gz
Release 18.08
Diffstat (limited to 'include/armnn/IProfiler.hpp')
-rw-r--r--include/armnn/IProfiler.hpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/include/armnn/IProfiler.hpp b/include/armnn/IProfiler.hpp
new file mode 100644
index 0000000000..a28173e5e1
--- /dev/null
+++ b/include/armnn/IProfiler.hpp
@@ -0,0 +1,38 @@
+//
+// Copyright © 2017 Arm Ltd. All rights reserved.
+// See LICENSE file in the project root for full license information.
+//
+
+#pragma once
+
+#include <iostream>
+
+namespace armnn
+{
+
+class IProfiler
+{
+public:
+ /// Enables/disables profiling for this profiler.
+ /// @param [in] enableProfiling A flag that indicates whether profiling should be enabled or not.
+ virtual void EnableProfiling(bool enableProfiling) = 0;
+
+ /// Checks whether profiling is enabled.
+ /// Profiling is disabled by default.
+ /// @return true if profiling is enabled, false otherwise.
+ virtual bool IsProfilingEnabled() = 0;
+
+ /// Analyzes the tracked events and writes the results to the given output stream.
+ /// Please refer to the configuration variables in Profiling.cpp to customize the information written.
+ /// @param [out] outStream The stream where to write the profiling results to.
+ virtual void AnalyzeEventsAndWriteResults(std::ostream& outStream) const = 0;
+
+ /// Print stats for events in JSON Format to the given output stream.
+ /// @param [out] outStream The stream where to write the profiling results to.
+ virtual void Print(std::ostream& outStream) const = 0;
+
+protected:
+ ~IProfiler() {}
+};
+
+} // namespace armnn