Browse Source

allocate the correct amount of chunks for caching (missing was the run count) and add them to the queue for each run

master
Constantin Fürst 11 months ago
parent
commit
16e47a862f
  1. 7
      qdp_project/src/Benchmark.cpp

7
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<uint8_t*>(ptr));
memset(ptr, 0xAB, AGGRJ_CHUNK_SIZE_B);
}
}
@ -178,6 +177,10 @@ int main() {
std::promise<void> launch_promise;
LAUNCH_ = launch_promise.get_future();
for (void* ptr : cache_memory_locations) {
CACHE_LOCATIONS_.push(reinterpret_cast<uint8_t*>(ptr));
}
std::vector<std::thread> filter_pool;
std::vector<std::thread> copy_pool;
std::vector<std::thread> agg_pool;

Loading…
Cancel
Save