Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
conNULL committed Sep 27, 2024
1 parent 7109abb commit 7158519
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
11 changes: 6 additions & 5 deletions clients/drcachesim/simulator/prefetcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,15 @@ prefetcher_t::prefetcher_t(int block_size)
}

void
prefetcher_t::prefetch(caching_device_t *cache, const memref_t &memref_in, const bool missed)
prefetcher_t::prefetch(caching_device_t *cache, const memref_t &memref_in,
const bool missed)
{
// We implement a simple next-line prefetcher.
if (missed && !type_is_prefetch(memref_in.data.type)) {
memref_t memref = memref_in;
memref.data.addr += block_size_;
memref.data.type = TRACE_TYPE_HARDWARE_PREFETCH;
cache->request(memref);
memref_t memref = memref_in;
memref.data.addr += block_size_;
memref.data.type = TRACE_TYPE_HARDWARE_PREFETCH;
cache->request(memref);
}
}
} // namespace drmemtrace
Expand Down
12 changes: 6 additions & 6 deletions clients/drcachesim/tests/drcachesim_unit_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,12 +331,12 @@ class next2line_prefetcher_factory_t : public prefetcher_factory_t {
{
// We implement a simple 2 next-line prefetcher.i
if (missed && !type_is_prefetch(memref_in.data.type)) {
memref_t memref = memref_in;
memref.data.addr += block_size_;
memref.data.type = TRACE_TYPE_HARDWARE_PREFETCH;
cache->request(memref);
memref.data.addr += block_size_;
cache->request(memref);
memref_t memref = memref_in;
memref.data.addr += block_size_;
memref.data.type = TRACE_TYPE_HARDWARE_PREFETCH;
cache->request(memref);
memref.data.addr += block_size_;
cache->request(memref);
}
}
};
Expand Down

0 comments on commit 7158519

Please sign in to comment.