diff --git a/qdp_project/src/Benchmark.cpp b/qdp_project/src/Benchmark.cpp index 3d7de33..c2f9752 100644 --- a/qdp_project/src/Benchmark.cpp +++ b/qdp_project/src/Benchmark.cpp @@ -15,7 +15,7 @@ #include "../../offloading-cacher/cache.hpp" #ifndef MODE_SET_BY_CMAKE -#define MODE_COMPLEX_PREFETCH +#define MODE_COMPLEX_HBM #endif #include "Configuration.hpp" @@ -64,8 +64,8 @@ void scan_b(size_t gid, size_t tid) { if constexpr (COMPLEX_QUERY) { for (size_t i = 0; i < RUN_COUNT; i++) { const size_t chunk_index = get_chunk_index(gid, i); - uint64_t* chunk_ptr = get_chunk(DATA_B_, chunk_index, i); - uint16_t* mask_ptr = get_mask(MASK_B_, chunk_index, i); + uint64_t* chunk_ptr = get_chunk(DATA_B_, chunk_index, tid); + uint16_t* mask_ptr = get_mask(MASK_B_, chunk_index, tid); filter::apply_same(mask_ptr, nullptr, chunk_ptr, CMP_B, CHUNK_SIZE_B / TC_SCANB); } @@ -154,7 +154,7 @@ void aggr_j(size_t gid, size_t tid) { BARRIERS_[gid]->arrive_and_drop(); - aggregation::happly(DATA_DST_ + (tid * GROUP_COUNT + gid), aggregator); + aggregation::happly(&DATA_DST_[gid + tid], aggregator); } int main() { @@ -233,11 +233,11 @@ int main() { for(std::thread& t : copy_pool) { t.join(); } for(std::thread& t : agg_pool) { t.join(); } - Aggregation::apply(DATA_DST_, DATA_DST_, sizeof(uint64_t) * TC_AGGRJ * GROUP_COUNT); + uint64_t result_actual = 0; + Aggregation::apply(&result_actual, DATA_DST_, sizeof(uint64_t) * TC_AGGRJ * GROUP_COUNT); const auto time_end = std::chrono::steady_clock::now(); - const uint64_t result_actual = DATA_DST_[0]; const uint64_t result_expected = COMPLEX_QUERY ? sum_check_complex(CMP_A, CMP_B, DATA_A_, DATA_B_, WL_SIZE_B) : sum_check(CMP_A, DATA_A_, DATA_B_, WL_SIZE_B); std::cout << "Result Expected: " << result_expected << ", Result Actual: " << result_actual << std::endl;