From 371b70e39390618cbd791b441adcf3923964b8df Mon Sep 17 00:00:00 2001 From: Matthew Sloyan Date: Fri, 11 Sep 2020 10:14:57 +0100 Subject: IVGCVSW-5301 Remove all boost::numeric_cast from armnn/src/profiling * Replaced with armnn/utility/NumericCast.hpp Signed-off-by: Matthew Sloyan Change-Id: I14e89c00cd1dd607315113d5b8ca56c2e9f6c363 --- src/profiling/ProfilingUtils.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/profiling/ProfilingUtils.cpp') diff --git a/src/profiling/ProfilingUtils.cpp b/src/profiling/ProfilingUtils.cpp index 4767f3e746..f00f15667b 100644 --- a/src/profiling/ProfilingUtils.cpp +++ b/src/profiling/ProfilingUtils.cpp @@ -338,7 +338,7 @@ TimelinePacketStatus WriteTimelineLabelBinaryPacket(uint64_t profilingGuid, } // Calculate the size of the SWTrace string label (in bytes) - unsigned int swTraceLabelSize = boost::numeric_cast(swTraceLabel.size()) * uint32_t_size; + unsigned int swTraceLabelSize = armnn::numeric_cast(swTraceLabel.size()) * uint32_t_size; // Calculate the length of the data (in bytes) unsigned int timelineLabelPacketDataLength = uint32_t_size + // decl_Id @@ -541,7 +541,7 @@ TimelinePacketStatus WriteTimelineMessageDirectoryPackage(unsigned char* buffer, uint32_t declId = 0; try { - declId = boost::numeric_cast(std::stoul(directoryComponent[0])); + declId = armnn::numeric_cast(std::stoul(directoryComponent[0])); } catch (const std::exception&) { @@ -565,7 +565,7 @@ TimelinePacketStatus WriteTimelineMessageDirectoryPackage(unsigned char* buffer, } unsigned int dataLength = 3 * uint8_t_size + // Stream header (3 bytes) - boost::numeric_cast(swTraceBuffer.size()) * + armnn::numeric_cast(swTraceBuffer.size()) * uint32_t_size; // Trace directory (5 messages) // Calculate the timeline directory binary packet size (in bytes) @@ -579,7 +579,7 @@ TimelinePacketStatus WriteTimelineMessageDirectoryPackage(unsigned char* buffer, } // Create packet header - auto packetHeader = CreateTimelinePacketHeader(1, 0, 0, 0, 0, boost::numeric_cast(dataLength)); + auto packetHeader = CreateTimelinePacketHeader(1, 0, 0, 0, 0, armnn::numeric_cast(dataLength)); // Initialize the offset for writing in the buffer unsigned int offset = 0; @@ -592,8 +592,8 @@ TimelinePacketStatus WriteTimelineMessageDirectoryPackage(unsigned char* buffer, // Write the stream header uint8_t streamVersion = 4; - uint8_t pointerBytes = boost::numeric_cast(uint64_t_size); // All GUIDs are uint64_t - uint8_t threadIdBytes = boost::numeric_cast(ThreadIdSize); + uint8_t pointerBytes = armnn::numeric_cast(uint64_t_size); // All GUIDs are uint64_t + uint8_t threadIdBytes = armnn::numeric_cast(ThreadIdSize); switch (threadIdBytes) { case 4: // Typically Windows and Android @@ -610,7 +610,7 @@ TimelinePacketStatus WriteTimelineMessageDirectoryPackage(unsigned char* buffer, offset += uint8_t_size; // Write the SWTrace directory - uint32_t numberOfDeclarations = boost::numeric_cast(timelineDirectoryMessages.size()); + uint32_t numberOfDeclarations = armnn::numeric_cast(timelineDirectoryMessages.size()); WriteUint32(buffer, offset, numberOfDeclarations); // Number of declarations offset += uint32_t_size; for (uint32_t i : swTraceBuffer) -- cgit v1.2.1