diff options
author | Colm Donelan <Colm.Donelan@arm.com> | 2020-05-12 16:36:46 +0100 |
---|---|---|
committer | Jim Flynn <jim.flynn@arm.com> | 2020-05-13 06:57:07 +0000 |
commit | 5bb3d8a1edeab3f4fdbeb9baf7922cc52bd815fb (patch) | |
tree | dde9b2ebeeccb81e089d1f4281dfbc3092bd626b /src/profiling/test/TimelineUtilityMethodsTests.cpp | |
parent | 0c8cb99db6dd8b1ea073ef7227b2872a3cb0b269 (diff) | |
download | armnn-5bb3d8a1edeab3f4fdbeb9baf7922cc52bd815fb.tar.gz |
IVGCVSW-4775 Centralizing definition of ThreadIdSize to fix MLCE-189
* Introduce a constant definition of the size of a POSIX thread ID.
* Update all code to use the new constant definition.
* Update all unit tests to use the new constant definition.
Signed-off-by: Colm Donelan <Colm.Donelan@arm.com>
Change-Id: I836ab1a77ed13f774e66fd7b425923c24b9a6dab
Diffstat (limited to 'src/profiling/test/TimelineUtilityMethodsTests.cpp')
-rw-r--r-- | src/profiling/test/TimelineUtilityMethodsTests.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/profiling/test/TimelineUtilityMethodsTests.cpp b/src/profiling/test/TimelineUtilityMethodsTests.cpp index caffcc74b0..388d38acc4 100644 --- a/src/profiling/test/TimelineUtilityMethodsTests.cpp +++ b/src/profiling/test/TimelineUtilityMethodsTests.cpp @@ -429,8 +429,8 @@ BOOST_AUTO_TEST_CASE(RecordEventTest) auto readableBuffer = mockBufferManager.GetReadableBuffer(); BOOST_CHECK(readableBuffer != nullptr); unsigned int size = readableBuffer->GetSize(); - unsigned int threadId_size = sizeof(std::thread::id); // Is platform dependent - BOOST_CHECK(size == 92 + threadId_size); + + BOOST_CHECK(size == 92 + ThreadIdSize); const unsigned char* readableData = readableBuffer->GetReadableData(); BOOST_CHECK(readableData != nullptr); @@ -439,7 +439,7 @@ BOOST_AUTO_TEST_CASE(RecordEventTest) unsigned int offset = 0; // Verify Header - VerifyTimelineHeaderBinary(readableData, offset, 84 + threadId_size); + VerifyTimelineHeaderBinary(readableData, offset, 84 + ThreadIdSize); // First dataset sent: TimelineEntityBinaryPacket VerifyTimelineEventBinaryPacket(EmptyOptional(), EmptyOptional(), EmptyOptional(), readableData, offset); |