diff options
author | Jim Flynn <jim.flynn@arm.com> | 2022-03-23 23:01:26 +0000 |
---|---|---|
committer | Jim Flynn <jim.flynn@arm.com> | 2022-03-23 23:43:35 +0000 |
commit | 3e9bc19ad523361e6b18057849e30c0c48183915 (patch) | |
tree | b7b012a9734ce39d054fc5d92302780fd838e5c8 /src/profiling/ProfilingConnectionFactory.cpp | |
parent | 277618302d0f131eac0b6ac2015dd3eb09aa6ff9 (diff) | |
download | armnn-3e9bc19ad523361e6b18057849e30c0c48183915.tar.gz |
IVGCVSW-6706 Create the libpipeClient library
Change-Id: I2368aade38ad3808fab55d8a86cd659d4e95d91e
Signed-off-by: Jim Flynn <jim.flynn@arm.com>
Diffstat (limited to 'src/profiling/ProfilingConnectionFactory.cpp')
-rw-r--r-- | src/profiling/ProfilingConnectionFactory.cpp | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/src/profiling/ProfilingConnectionFactory.cpp b/src/profiling/ProfilingConnectionFactory.cpp deleted file mode 100644 index 0b34a02ae2..0000000000 --- a/src/profiling/ProfilingConnectionFactory.cpp +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright © 2019 Arm Ltd and Contributors. All rights reserved. -// SPDX-License-Identifier: MIT -// - -#include "ProfilingConnectionFactory.hpp" - -#include "FileOnlyProfilingConnection.hpp" -#include "ProfilingConnectionDumpToFileDecorator.hpp" -#include "SocketProfilingConnection.hpp" - -namespace arm -{ - -namespace pipe -{ - -std::unique_ptr<IProfilingConnection> ProfilingConnectionFactory::GetProfilingConnection( - const ProfilingOptions& options) const -{ - // Before proceed to create the IProfilingConnection, check if the file format is supported - if (!(options.m_FileFormat == "binary")) - { - throw arm::pipe::UnimplementedException("Unsupported profiling file format, only binary is supported"); - } - - // We can create 3 different types of IProfilingConnection. - // 1: If no relevant options are specified then a SocketProfilingConnection is returned. - // 2: If both incoming and outgoing capture files are specified then a SocketProfilingConnection decorated by a - // ProfilingConnectionDumpToFileDecorator is returned. - // 3: If both incoming and outgoing capture files are specified and "file only" then a FileOnlyProfilingConnection - // decorated by a ProfilingConnectionDumpToFileDecorator is returned. - // 4. There is now another option if m_FileOnly == true and there are ILocalPacketHandlers specified - // we can create a FileOnlyProfilingConnection without a file dump - if ((!options.m_IncomingCaptureFile.empty() || !options.m_OutgoingCaptureFile.empty()) && !options.m_FileOnly) - { - // This is type 2. - return std::make_unique<ProfilingConnectionDumpToFileDecorator>(std::make_unique<SocketProfilingConnection>(), - options); - } - else if ((!options.m_IncomingCaptureFile.empty() || !options.m_OutgoingCaptureFile.empty()) && options.m_FileOnly) - { - // This is type 3. - return std::make_unique<ProfilingConnectionDumpToFileDecorator>( - std::make_unique<FileOnlyProfilingConnection>(options), options); - } - else if (options.m_FileOnly && !options.m_LocalPacketHandlers.empty()) - { - // This is the type 4. - return std::make_unique<FileOnlyProfilingConnection>(options); - } - else - { - // This is type 1. - return std::make_unique<SocketProfilingConnection>(); - } -} - -} // namespace pipe - -} // namespace arm |