summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCNugteren <web@cedricnugteren.nl>2015-07-19 16:24:14 +0200
committerCNugteren <web@cedricnugteren.nl>2015-07-19 16:24:14 +0200
commit48e2e96f1ba44e9b12a2449390bbbbd5e02777a3 (patch)
tree04d33841f31f6ef8bbf38c9cce15e9bbdbde01cc /include
parent4e499a67c1eb9f7cc4a79e75046aa0315b5df87d (diff)
Kernel caching is now based on a routine's name
Diffstat (limited to 'include')
-rw-r--r--include/internal/routine.h19
1 files changed, 6 insertions, 13 deletions
diff --git a/include/internal/routine.h b/include/internal/routine.h
index 7b605d48..911bda49 100644
--- a/include/internal/routine.h
+++ b/include/internal/routine.h
@@ -34,20 +34,14 @@ class Routine {
Program program;
std::string device_name;
Precision precision;
- std::vector<std::string> routines;
+ std::string routine_name_;
// Finds out whether the properties match
- bool MatchInCache(const std::string &ref_name, const Precision &ref_precision,
- const std::vector<std::string> &ref_routines) {
- auto ref_size = ref_routines.size();
- if (device_name == ref_name && precision == ref_precision && routines.size() == ref_size) {
- auto found_match = true;
- for (auto i=size_t{0}; i<ref_size; ++i) {
- if (routines[i] != ref_routines[i]) { found_match = false; }
- }
- return found_match;
- }
- return false;
+ bool MatchInCache(const std::string &ref_device, const Precision &ref_precision,
+ const std::string &ref_routine) {
+ return (device_name == ref_device &&
+ precision == ref_precision &&
+ routine_name_ == ref_routine);
}
};
@@ -125,7 +119,6 @@ class Routine {
// Connection to the database for all the device-specific parameters
const Database db_;
- const std::vector<std::string> routines_;
};
// =================================================================================================