diff options
author | Aron Virginas-Tar <Aron.Virginas-Tar@arm.com> | 2019-08-23 15:18:44 +0100 |
---|---|---|
committer | Aron Virginas-Tar <Aron.Virginas-Tar@arm.com> | 2019-08-23 15:19:33 +0100 |
commit | 1a0f691a24b1514afe4d3ea6e1322357083af526 (patch) | |
tree | b65317c876991eac63e80fc9d026a7e5dc6b6281 /src/profiling | |
parent | 4e5fc1fb6c74fa6e4dcb24639db8fafd69a0a065 (diff) | |
download | armnn-1a0f691a24b1514afe4d3ea6e1322357083af526.tar.gz |
IVGCVSW-3441 Create IProfilingConnection and ProfilingConnectionFactory
Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com>
Change-Id: I912312f31d4fd82b23bafe8e3ec461b179f3e97a
Diffstat (limited to 'src/profiling')
-rw-r--r-- | src/profiling/IProfilingConnection.hpp | 32 | ||||
-rw-r--r-- | src/profiling/ProfilingConnectionFactory.cpp | 22 | ||||
-rw-r--r-- | src/profiling/ProfilingConnectionFactory.hpp | 32 |
3 files changed, 86 insertions, 0 deletions
diff --git a/src/profiling/IProfilingConnection.hpp b/src/profiling/IProfilingConnection.hpp new file mode 100644 index 0000000000..c8387f2a83 --- /dev/null +++ b/src/profiling/IProfilingConnection.hpp @@ -0,0 +1,32 @@ +// +// Copyright © 2017 Arm Ltd. All rights reserved. +// SPDX-License-Identifier: MIT +// + +#pragma once + +#include "Packet.hpp" + +#include <cstdint> + +namespace armnn +{ + +namespace profiling +{ + +class IProfilingConnection +{ +public: + virtual bool IsOpen() = 0; + + virtual void Close() = 0; + + virtual bool WritePacket(const char* buffer, uint32_t length) = 0; + + virtual Packet ReadPacket(uint32_t timeout) = 0; +}; + +} // namespace profiling + +} // namespace armnn diff --git a/src/profiling/ProfilingConnectionFactory.cpp b/src/profiling/ProfilingConnectionFactory.cpp new file mode 100644 index 0000000000..1b4924df72 --- /dev/null +++ b/src/profiling/ProfilingConnectionFactory.cpp @@ -0,0 +1,22 @@ +// +// Copyright © 2017 Arm Ltd. All rights reserved. +// SPDX-License-Identifier: MIT +// + +#include "ProfilingConnectionFactory.hpp" + +namespace armnn +{ + +namespace profiling +{ + +std::unique_ptr<IProfilingConnection> ProfilingConnectionFactory::GetProfilingConnection( + const Runtime::CreationOptions::ExternalProfilingOptions& options) const +{ + return nullptr; +} + +} // namespace profiling + +} // namespace armnn diff --git a/src/profiling/ProfilingConnectionFactory.hpp b/src/profiling/ProfilingConnectionFactory.hpp new file mode 100644 index 0000000000..102c82070e --- /dev/null +++ b/src/profiling/ProfilingConnectionFactory.hpp @@ -0,0 +1,32 @@ +// +// Copyright © 2017 Arm Ltd. All rights reserved. +// SPDX-License-Identifier: MIT +// + +#pragma once + +#include "IProfilingConnection.hpp" + +#include <Runtime.hpp> + +#include <memory> + +namespace armnn +{ + +namespace profiling +{ + +class ProfilingConnectionFactory final +{ +public: + ProfilingConnectionFactory() = default; + ~ProfilingConnectionFactory() = default; + + std::unique_ptr<IProfilingConnection> GetProfilingConnection( + const Runtime::CreationOptions::ExternalProfilingOptions& options) const; +}; + +} // namespace profiling + +} // namespace armnn |