Browse Source

wait per iteration for caching mode

master
Constantin Fürst 11 months ago
parent
commit
f16d67f67e
  1. 12
      qdp_project/src/benchmark/pipelines/MAX_scan_filter_pipe.h

12
qdp_project/src/benchmark/pipelines/MAX_scan_filter_pipe.h

@ -232,7 +232,7 @@ private:
public: public:
void scan_b(size_t gid, size_t gcnt, size_t tid) { void scan_b(size_t gid, size_t gcnt, size_t tid) {
size_t tcnt = thread_count_fc;
size_t tcnt = thread_count_ag;
assert(chunk_size_w % tcnt == 0); assert(chunk_size_w % tcnt == 0);
assert(chunk_size_w % 16 == 0); assert(chunk_size_w % 16 == 0);
assert(chunk_size_w % tcnt * 16 == 0); assert(chunk_size_w % tcnt * 16 == 0);
@ -261,8 +261,11 @@ public:
trt->stop_timer(1, tid * gcnt + gid); trt->stop_timer(1, tid * gcnt + gid);
bt->timed_wait(*(*sync_barrier)[barrier_idx], 1, tid * gcnt + gid); bt->timed_wait(*(*sync_barrier)[barrier_idx], 1, tid * gcnt + gid);
if constexpr (caching) (*(*sync_barrier)[barrier_idx]).arrive_and_drop();
} }
(*(*sync_barrier)[barrier_idx]).arrive_and_drop();
if constexpr (!caching) (*(*sync_barrier)[barrier_idx]).arrive_and_drop();
} }
void scan_a(size_t gid, size_t gcnt, size_t tid) { void scan_a(size_t gid, size_t gcnt, size_t tid) {
@ -291,8 +294,11 @@ public:
pvc->stop("scan_a", tid * gcnt + gid); pvc->stop("scan_a", tid * gcnt + gid);
trt->stop_timer(0, tid * gcnt + gid); trt->stop_timer(0, tid * gcnt + gid);
bt->timed_wait(*(*sync_barrier)[barrier_idx], 0, tid * gcnt + gid); bt->timed_wait(*(*sync_barrier)[barrier_idx], 0, tid * gcnt + gid);
if constexpr (caching) (*(*sync_barrier)[barrier_idx]).arrive_and_drop();
} }
(*(*sync_barrier)[barrier_idx]).arrive_and_drop();
if constexpr (!caching) (*(*sync_barrier)[barrier_idx]).arrive_and_drop();
} }
void aggr_j(size_t gid, size_t gcnt, size_t tid) { void aggr_j(size_t gid, size_t gcnt, size_t tid) {

Loading…
Cancel
Save