From 330fdc8580dcef33d29d3106b0c6f86c3ef50347 Mon Sep 17 00:00:00 2001 From: Marcin Krotkiewski Date: Thu, 25 Nov 2021 10:53:12 +0200 Subject: [PATCH] change flush array init --- cartex/src/runtime/runtime.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cartex/src/runtime/runtime.cpp b/cartex/src/runtime/runtime.cpp index d2d7060..d85721a 100644 --- a/cartex/src/runtime/runtime.cpp +++ b/cartex/src/runtime/runtime.cpp @@ -31,7 +31,8 @@ runtime::exchange(int j, thread_pool::barrier& b) #ifdef CARTEX_EVICT_CACHE if(m_rank==0) std::cout << "cache flush size " << CARTEX_EVICT_CACHE_SIZE << "\n"; auto cache_ptr = new double[CARTEX_EVICT_CACHE_SIZE/sizeof(double)]; - memset(cache_ptr, 1, sizeof(double)*(CARTEX_EVICT_CACHE_SIZE/sizeof(double))); + for (long unsigned int i=0; i<(CARTEX_EVICT_CACHE_SIZE/sizeof(double)); ++i) + cache_ptr[i] = i; #endif // check for correctness