Browse Source

pass data size to copy policy function too

master
Constantin Fürst 11 months ago
parent
commit
da38c048ca
  1. 4
      offloading-cacher/cache.hpp

4
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<int> (CopyPolicy)(const int numa_dst_node, const int numa_src_node);
typedef std::vector<int> (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<int> executing_nodes = copy_policy_function_(dst_node, src_node);
const std::vector<int> 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

Loading…
Cancel
Save