aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/IPacketBuffer.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/profiling/IPacketBuffer.hpp')
-rw-r--r--src/profiling/IPacketBuffer.hpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/profiling/IPacketBuffer.hpp b/src/profiling/IPacketBuffer.hpp
new file mode 100644
index 0000000000..b4bd615bab
--- /dev/null
+++ b/src/profiling/IPacketBuffer.hpp
@@ -0,0 +1,40 @@
+//
+// Copyright © 2019 Arm Ltd. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+
+#pragma once
+
+namespace armnn
+{
+
+namespace profiling
+{
+
+class IReadOnlyPacketBuffer // interface used by the read thread
+{
+public:
+ virtual ~IReadOnlyPacketBuffer() {}
+
+ virtual const unsigned char* const GetReadableData() const = 0;
+
+ virtual unsigned int GetSize() const = 0;
+
+ virtual void MarkRead() = 0;
+};
+
+class IPacketBuffer : public IReadOnlyPacketBuffer // interface used by code that writes binary packets
+{
+public:
+ virtual ~IPacketBuffer() {}
+
+ virtual void Commit(unsigned int size) = 0;
+
+ virtual void Release() = 0;
+
+ virtual unsigned char* GetWritableData() = 0;
+};
+
+} // namespace profiling
+
+} // namespace armnn \ No newline at end of file