diff options
author | Cedric Nugteren <web@cedricnugteren.nl> | 2017-09-23 20:40:38 +0200 |
---|---|---|
committer | Cedric Nugteren <web@cedricnugteren.nl> | 2017-09-23 20:40:38 +0200 |
commit | 255f09843cb4a0a10e04a9581184750da0d36593 (patch) | |
tree | bcedb6766ea194bf6c1bc7cfeb7a9394af1f02b5 /src/database | |
parent | 0d8313708ca84f5338f405ae9b3261188e87b6f7 (diff) |
Made program and binary databases dependent on the routine parameters on top of the name
Diffstat (limited to 'src/database')
-rw-r--r-- | src/database/database.cpp | 9 | ||||
-rw-r--r-- | src/database/database.hpp | 3 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/database/database.cpp b/src/database/database.cpp index 64306c7b..836c8803 100644 --- a/src/database/database.cpp +++ b/src/database/database.cpp @@ -124,6 +124,15 @@ std::string Database::GetDefines() const { return defines; } +// ... or just the values as string +std::string Database::GetValuesString() const { + std::string defines{}; + for (auto ¶meter: *parameters_) { + defines += "_"+ToString(parameter.second); + } + return defines; +} + // Retrieves the names of all the parameters std::vector<std::string> Database::GetParameterNames() const { auto parameter_names = std::vector<std::string>(); diff --git a/src/database/database.hpp b/src/database/database.hpp index 4cb0bf6a..04e9f095 100644 --- a/src/database/database.hpp +++ b/src/database/database.hpp @@ -53,7 +53,8 @@ class Database { // Obtain a list of OpenCL pre-processor defines based on the parameters std::string GetDefines() const; - // Retrieves the names of all the parameters + // Retrieves the values or names of all the parameters + std::string GetValuesString() const; std::vector<std::string> GetParameterNames() const; private: |