From da38c048ca53bf2a1971eeae500e92242c4e235f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Constantin=20F=C3=BCrst?= Date: Tue, 16 Jan 2024 22:14:58 +0100 Subject: [PATCH] pass data size to copy policy function too --- offloading-cacher/cache.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/offloading-cacher/cache.hpp b/offloading-cacher/cache.hpp index 78d16b0..b84e347 100644 --- a/offloading-cacher/cache.hpp +++ b/offloading-cacher/cache.hpp @@ -191,7 +191,7 @@ namespace dsacache { // copy policy specifies the copy-executing nodes for a given task // which allows flexibility in assignment for optimizing raw throughput // or choosing a conservative usage policy - typedef std::vector (CopyPolicy)(const int numa_dst_node, const int numa_src_node); + typedef std::vector (CopyPolicy)(const int numa_dst_node, const int numa_src_node, const size_t data_size); private: // mutex for accessing the cache state map @@ -396,7 +396,7 @@ inline void dsacache::Cache::SubmitTask(CacheData* task, const int dst_node, con // querry copy policy function for the nodes to use for the copy - const std::vector executing_nodes = copy_policy_function_(dst_node, src_node); + const std::vector executing_nodes = copy_policy_function_(dst_node, src_node, task->size_); const size_t task_count = executing_nodes.size(); // each task will copy one fair part of the total size