From 21e1df5f9d32d8b8c87d59b0297da333f4112170 Mon Sep 17 00:00:00 2001 From: Yifan Zhao <yifanz16@illinois.edu> Date: Thu, 16 Jan 2020 15:45:04 -0600 Subject: [PATCH] Added const policy (use the same device all the time) --- hpvm/projects/visc-rt/policy.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hpvm/projects/visc-rt/policy.h b/hpvm/projects/visc-rt/policy.h index f30c310c1a..4bd6fa0469 100644 --- a/hpvm/projects/visc-rt/policy.h +++ b/hpvm/projects/visc-rt/policy.h @@ -11,6 +11,18 @@ class Policy { virtual ~Policy() {}; }; +class ConstPolicy : public Policy { +public: + ConstPolicy(int deviceID): deviceID(deviceID) {} + + int getVersion(const char *, int64_t) override { + return deviceID; + } + +private: + int deviceID; +}; + class NodePolicy : public Policy { virtual int getVersion(const char *name, int64_t it) override { std::string s(name); -- GitLab