Browse Source

potential fix for lifetime of cache data

master
Constantin Fürst 11 months ago
parent
commit
74f659e5a4
  1. 4
      qdp_project/src/benchmark/pipelines/MAX_scan_filter_pipe.h

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

@ -313,12 +313,14 @@ public:
// calculate pointers
size_t chunk_id = gid + gcnt * i;
base_t* chunk_ptr = get_sub_chunk_ptr(data_b, chunk_id, chunk_size_w, tid, tcnt);
std::unique_ptr<dsacache::CacheData> data;
base_t* data_ptr;
if constexpr (caching) {
// access the cache for the given chunk which will have been accessed in scan_b
const auto data = cache_.Access(reinterpret_cast<uint8_t *>(chunk_ptr), chunk_size_b / tcnt);
data = cache_.Access(reinterpret_cast<uint8_t *>(chunk_ptr), chunk_size_b / tcnt);
// wait on the caching task to complete, this will give time for other processes
// to make progress here which will therefore not hurt performance

Loading…
Cancel
Save