Browse Source

properly set barrier when using iterrative aggregation

master
Constantin Fürst 11 months ago
parent
commit
5c08313830
  1. 14
      qdp_project/src/Benchmark.cpp

14
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(); 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(); THREAD_TIMING_[AGGRJ_TIMING_INDEX][tid * gid][0][TIME_STAMP_WAIT] = std::chrono::steady_clock::now();
@ -341,7 +346,12 @@ int main() {
std::vector<std::thread> agg_pool; std::vector<std::thread> agg_pool;
for(uint32_t gid = 0; gid < GROUP_COUNT; ++gid) { for(uint32_t gid = 0; gid < GROUP_COUNT; ++gid) {
BARRIERS_.emplace_back(new std::barrier<NopStruct>(TC_COMBINED));
if constexpr (AGGRJ_ITERATIVE) {
BARRIERS_.emplace_back(new std::barrier<NopStruct>(TC_SCANA + TC_SCANB + 1));
}
else {
BARRIERS_.emplace_back(new std::barrier<NopStruct>(TC_COMBINED));
}
for(uint32_t tid = 0; tid < TC_SCANA; ++tid) { for(uint32_t tid = 0; tid < TC_SCANA; ++tid) {
filter_pool.emplace_back(scan_a, gid, tid); filter_pool.emplace_back(scan_a, gid, tid);

Loading…
Cancel
Save