diff --git a/qdp_project/src/Benchmark.cpp b/qdp_project/src/Benchmark.cpp index 0ba05e9..52af4cb 100644 --- a/qdp_project/src/Benchmark.cpp +++ b/qdp_project/src/Benchmark.cpp @@ -254,7 +254,12 @@ void aggr_j(size_t gid, size_t tid) { THREAD_TIMING_[AGGRJ_TIMING_INDEX][tid * gid][0][TIME_STAMP_BEGIN] = std::chrono::steady_clock::now(); - BARRIERS_[gid]->arrive_and_wait(); + if constexpr (AGGRJ_ITERATIVE) { + if (tid == 0) BARRIERS_[gid]->arrive_and_wait(); + } + else { + BARRIERS_[gid]->arrive_and_wait(); + } THREAD_TIMING_[AGGRJ_TIMING_INDEX][tid * gid][0][TIME_STAMP_WAIT] = std::chrono::steady_clock::now(); @@ -341,7 +346,12 @@ int main() { std::vector agg_pool; for(uint32_t gid = 0; gid < GROUP_COUNT; ++gid) { - BARRIERS_.emplace_back(new std::barrier(TC_COMBINED)); + if constexpr (AGGRJ_ITERATIVE) { + BARRIERS_.emplace_back(new std::barrier(TC_SCANA + TC_SCANB + 1)); + } + else { + BARRIERS_.emplace_back(new std::barrier(TC_COMBINED)); + } for(uint32_t tid = 0; tid < TC_SCANA; ++tid) { filter_pool.emplace_back(scan_a, gid, tid);