diff options
Diffstat (limited to 'include/armnn/IProfiler.hpp')
-rw-r--r-- | include/armnn/IProfiler.hpp | 38 |
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 |