Browse Source

correct bad thread timing storage size set which should have been 1 from the start and not 0

master
Constantin Fürst 11 months ago
parent
commit
34f7aca50a
  1. 12
      qdp_project/src/Benchmark.cpp

12
qdp_project/src/Benchmark.cpp

@ -178,12 +178,12 @@ void scan_b(size_t gid, size_t tid) {
const size_t start = tid * split;
const size_t end = start + split;
THREAD_TIMING_[SCANB_TIMING_INDEX][tid * gid].clear();
THREAD_TIMING_[SCANB_TIMING_INDEX][tid * gid].resize(0);
THREAD_TIMING_[SCANB_TIMING_INDEX][tid * gid].clear();
THREAD_TIMING_[SCANB_TIMING_INDEX][tid * gid].resize(1);
LAUNCH_.wait();
THREAD_TIMING_[SCANB_TIMING_INDEX][tid * gid][0][TIME_STAMP_BEGIN] = std::chrono::steady_clock::now();
THREAD_TIMING_[SCANB_TIMING_INDEX][tid * gid][0][TIME_STAMP_BEGIN] = std::chrono::steady_clock::now();
if constexpr (PERFORM_CACHING) {
for (size_t i = start; i < end; i++) {
@ -195,15 +195,15 @@ void scan_b(size_t gid, size_t tid) {
}
}
THREAD_TIMING_[SCANB_TIMING_INDEX][tid * gid][0][TIME_STAMP_WAIT] = std::chrono::steady_clock::now();
THREAD_TIMING_[SCANB_TIMING_INDEX][tid * gid][0][TIME_STAMP_END] = std::chrono::steady_clock::now();
THREAD_TIMING_[SCANB_TIMING_INDEX][tid * gid][0][TIME_STAMP_WAIT] = std::chrono::steady_clock::now();
THREAD_TIMING_[SCANB_TIMING_INDEX][tid * gid][0][TIME_STAMP_END] = std::chrono::steady_clock::now();
BARRIERS_[gid]->arrive_and_drop();
}
void scan_a(size_t gid, size_t tid) {
THREAD_TIMING_[SCANA_TIMING_INDEX][tid * gid].clear();
THREAD_TIMING_[SCANA_TIMING_INDEX][tid * gid].resize(0);
THREAD_TIMING_[SCANA_TIMING_INDEX][tid * gid].resize(1);
LAUNCH_.wait();

Loading…
Cancel
Save