From 16e47a862f4bf776749261ac23272b450523656e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Constantin=20F=C3=BCrst?= Date: Thu, 8 Feb 2024 16:40:26 +0100 Subject: [PATCH] allocate the correct amount of chunks for caching (missing was the run count) and add them to the queue for each run --- qdp_project/src/Benchmark.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qdp_project/src/Benchmark.cpp b/qdp_project/src/Benchmark.cpp index 0c1cb2a..0b24cb9 100644 --- a/qdp_project/src/Benchmark.cpp +++ b/qdp_project/src/Benchmark.cpp @@ -163,10 +163,9 @@ int main() { CACHE_.SetFlags(cache_flags); CACHE_.Init(CachePlacementPolicy, CopyMethodPolicy, MemoryAllocator_Allocate, MemoryAllocator_Free); - for (uint32_t i = 0; i < GROUP_COUNT * TC_AGGRJ; i++) { + for (uint32_t i = 0; i < GROUP_COUNT * TC_AGGRJ * RUN_COUNT; i++) { void* ptr = numa_alloc_onnode(AGGRJ_CHUNK_SIZE_B, MEM_NODE_HBM); cache_memory_locations.emplace_back(ptr); - CACHE_LOCATIONS_.push(reinterpret_cast(ptr)); memset(ptr, 0xAB, AGGRJ_CHUNK_SIZE_B); } } @@ -178,6 +177,10 @@ int main() { std::promise launch_promise; LAUNCH_ = launch_promise.get_future(); + for (void* ptr : cache_memory_locations) { + CACHE_LOCATIONS_.push(reinterpret_cast(ptr)); + } + std::vector filter_pool; std::vector copy_pool; std::vector agg_pool;