From a4a67532d178e605953818422921280f617fbea2 Mon Sep 17 00:00:00 2001 From: Andrej Babic Date: Tue, 5 May 2020 12:11:24 +0200 Subject: [PATCH] Add temporary implementation for arrays --- core-buffer/src/FastQueue.cpp | 3 ++- core-buffer/test/test_FastQueue.cpp | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/core-buffer/src/FastQueue.cpp b/core-buffer/src/FastQueue.cpp index e39ecc4..284efec 100644 --- a/core-buffer/src/FastQueue.cpp +++ b/core-buffer/src/FastQueue.cpp @@ -104,4 +104,5 @@ void FastQueue::release() } template class FastQueue; -template class FastQueue; \ No newline at end of file +template class FastQueue; +template class FastQueue; \ No newline at end of file diff --git a/core-buffer/test/test_FastQueue.cpp b/core-buffer/test/test_FastQueue.cpp index 98d351b..93eda27 100644 --- a/core-buffer/test/test_FastQueue.cpp +++ b/core-buffer/test/test_FastQueue.cpp @@ -107,4 +107,31 @@ TEST(FastQueue, data_transfer) for (size_t i=0; i queue( + slot_data_n_bytes, n_slots); + + int slot_id = queue.reserve(); + ASSERT_NE(slot_id, -1); + + auto metadata = queue.get_metadata_buffer(slot_id); + for (size_t i_module=0; i_modulemodule_id = i_module; + } + queue.commit(); + + slot_id = queue.read(); + ASSERT_NE(slot_id, -1); + + auto read_metadata = queue.get_metadata_buffer(slot_id); + for (size_t i_module=0; i_modulemodule_id, i_module); + } + + queue.release(); } \ No newline at end of file