From e4a0030049bd1a156556303b8172db01fb62e43d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Constantin=20F=C3=BCrst?= Date: Sat, 27 Jan 2024 12:15:31 +0100 Subject: [PATCH] fix prefetching subchunk indexing and adapt the weak access flag for join --- qdp_project/src/Benchmark.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qdp_project/src/Benchmark.cpp b/qdp_project/src/Benchmark.cpp index d7dc302..58b102f 100644 --- a/qdp_project/src/Benchmark.cpp +++ b/qdp_project/src/Benchmark.cpp @@ -41,6 +41,7 @@ uint64_t* DATA_DST_; void scan_b(size_t gid, size_t tid) { constexpr size_t SUBCHUNK_COUNT = TC_AGGRJ / (TC_SCANB == 0 ? 1 : TC_SCANB); constexpr size_t SUBCHUNK_SIZE_B = CHUNK_SIZE_B / SUBCHUNK_COUNT; + constexpr size_t SUBCHUNK_SIZE_ELEMENTS = CHUNK_SIZE_ELEMENTS / SUBCHUNK_COUNT; THREAD_TIMING_[SCANB_TIMING_INDEX][UniqueIndex(gid,tid)].clear(); THREAD_TIMING_[SCANB_TIMING_INDEX][UniqueIndex(gid,tid)].resize(1); @@ -55,7 +56,7 @@ void scan_b(size_t gid, size_t tid) { uint64_t* chunk_ptr = get_chunk(DATA_B_, chunk_index, i); for (size_t j = 0; j < SUBCHUNK_COUNT; j++) { - uint64_t* sub_chunk_ptr = &chunk_ptr[j * CHUNK_SIZE_ELEMENTS]; + uint64_t* sub_chunk_ptr = &chunk_ptr[j * SUBCHUNK_SIZE_ELEMENTS]; CACHE_.Access(reinterpret_cast(sub_chunk_ptr), SUBCHUNK_SIZE_B); } } @@ -125,7 +126,7 @@ void aggr_j(size_t gid, size_t tid) { uint64_t* data_ptr; if constexpr (PERFORM_CACHING) { - data = CACHE_.Access(reinterpret_cast(chunk_ptr), CHUNK_SIZE_B / TC_AGGRJ); + data = CACHE_.Access(reinterpret_cast(chunk_ptr), CHUNK_SIZE_B / TC_AGGRJ, dsacache::FLAG_ACCESS_WEAK); data->WaitOnCompletion(); data_ptr = reinterpret_cast(data->GetDataLocation());