Jim Flynn | 4c9ed1d | 2022-01-23 23:57:20 +0000 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2022 Arm Ltd and Contributors. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #include "ProfilingOptionsConverter.hpp" |
| 7 | |
| 8 | #include <algorithm> |
| 9 | #include <iterator> |
| 10 | |
Cathal Corbett | 5aa9fd7 | 2022-02-25 15:33:28 +0000 | [diff] [blame] | 11 | namespace arm |
Jim Flynn | 4c9ed1d | 2022-01-23 23:57:20 +0000 | [diff] [blame] | 12 | { |
| 13 | |
Cathal Corbett | 5aa9fd7 | 2022-02-25 15:33:28 +0000 | [diff] [blame] | 14 | namespace pipe |
Jim Flynn | 4c9ed1d | 2022-01-23 23:57:20 +0000 | [diff] [blame] | 15 | { |
Cathal Corbett | 5aa9fd7 | 2022-02-25 15:33:28 +0000 | [diff] [blame] | 16 | |
| 17 | ProfilingOptions ConvertExternalProfilingOptions( |
| 18 | const armnn::IRuntime::CreationOptions::ExternalProfilingOptions& options) |
| 19 | { |
| 20 | ProfilingOptions convertedOptions; |
| 21 | convertedOptions.m_EnableProfiling = options.m_EnableProfiling; |
| 22 | convertedOptions.m_TimelineEnabled = options.m_TimelineEnabled; |
Jim Flynn | 4c9ed1d | 2022-01-23 23:57:20 +0000 | [diff] [blame] | 23 | convertedOptions.m_OutgoingCaptureFile = options.m_OutgoingCaptureFile; |
| 24 | convertedOptions.m_IncomingCaptureFile = options.m_IncomingCaptureFile; |
Cathal Corbett | 5aa9fd7 | 2022-02-25 15:33:28 +0000 | [diff] [blame] | 25 | convertedOptions.m_FileOnly = options.m_FileOnly; |
| 26 | convertedOptions.m_CapturePeriod = options.m_CapturePeriod; |
| 27 | convertedOptions.m_FileFormat = options.m_FileFormat; |
Jim Flynn | 4c9ed1d | 2022-01-23 23:57:20 +0000 | [diff] [blame] | 28 | std::copy(options.m_LocalPacketHandlers.begin(), options.m_LocalPacketHandlers.end(), |
Cathal Corbett | 5aa9fd7 | 2022-02-25 15:33:28 +0000 | [diff] [blame] | 29 | std::back_inserter(convertedOptions.m_LocalPacketHandlers)); |
Jim Flynn | 4c9ed1d | 2022-01-23 23:57:20 +0000 | [diff] [blame] | 30 | return convertedOptions; |
| 31 | } |
| 32 | |
Cathal Corbett | 5aa9fd7 | 2022-02-25 15:33:28 +0000 | [diff] [blame] | 33 | } // namespace arm |
| 34 | |
| 35 | } // namespace pipe |