diff options
Diffstat (limited to 'src/database')
-rw-r--r-- | src/database/database.cpp | 9 | ||||
-rw-r--r-- | src/database/database.hpp | 3 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/database/database.cpp b/src/database/database.cpp index 8019d558..02d0b139 100644 --- a/src/database/database.cpp +++ b/src/database/database.cpp @@ -103,6 +103,15 @@ std::string Database::GetDefines() const { return defines; } +// Retrieves the names of all the parameters +std::vector<std::string> Database::GetParameterNames() const { + auto parameter_names = std::vector<std::string>(); + for (auto ¶meter: *parameters_) { + parameter_names.push_back(parameter.first); + } + return parameter_names; +} + // ================================================================================================= // Searches a particular database for the right kernel and precision diff --git a/src/database/database.hpp b/src/database/database.hpp index b6760ec3..b34e0d8a 100644 --- a/src/database/database.hpp +++ b/src/database/database.hpp @@ -85,6 +85,9 @@ 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 + std::vector<std::string> GetParameterNames() const; + private: // Search method for a specified database, returning pointer (possibly a nullptr) ParametersPtr Search(const std::string &this_kernel, const std::string &this_type, |