summaryrefslogtreecommitdiff
path: root/src/routine.hpp
diff options
context:
space:
mode:
authorCedric Nugteren <web@cedricnugteren.nl>2017-02-26 14:51:45 +0100
committerCedric Nugteren <web@cedricnugteren.nl>2017-02-26 14:51:45 +0100
commitea6790665d228e9ff9ba39983a60cd91611ee1fe (patch)
tree043ca277a867507f97f804cc4057fe50e548b9b1 /src/routine.hpp
parenta145890aaac0087d36b414bd59c247ae4b70b3e5 (diff)
parent0643a29af51f9eb13e2b276d0a0e74590c699d3b (diff)
Merge branch 'development' into triangular_solvers
Diffstat (limited to 'src/routine.hpp')
-rw-r--r--src/routine.hpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/routine.hpp b/src/routine.hpp
index f366e4d9..eb11b566 100644
--- a/src/routine.hpp
+++ b/src/routine.hpp
@@ -18,6 +18,7 @@
#include <string>
#include <vector>
+#include <unordered_map>
#include "utilities/utilities.hpp"
#include "cache.hpp"
@@ -42,22 +43,32 @@ class Routine {
const std::vector<const Database::DatabaseEntry*> &userDatabase,
std::initializer_list<const char *> source);
+ // List of kernel-routine look-ups
+ static const std::vector<std::string> routines_axpy;
+ static const std::vector<std::string> routines_dot;
+ static const std::vector<std::string> routines_ger;
+ static const std::vector<std::string> routines_gemv;
+ static const std::vector<std::string> routines_gemm;
+ static const std::vector<std::string> routines_gemm_syrk;
+ static const std::vector<std::string> routines_trsm;
+ static const std::unordered_map<std::string, const std::vector<std::string>> routines_by_kernel;
+
private:
// Initializes program_, fetching cached program or building one
void InitProgram(std::initializer_list<const char *> source);
// Initializes db_, fetching cached database or building one
- void InitDatabase(const std::vector<std::string> &routines,
- const std::vector<const Database::DatabaseEntry*> &userDatabase);
+ void InitDatabase(const std::vector<const Database::DatabaseEntry*> &userDatabase);
protected:
// Non-static variable for the precision
const Precision precision_;
- // The routine's name
+ // The routine's name and the corresponding kernels
const std::string routine_name_;
+ const std::vector<std::string> kernel_names_;
// The OpenCL objects, accessible only from derived classes
Queue queue_;
@@ -72,7 +83,7 @@ class Routine {
Program program_;
// Connection to the database for all the device-specific parameters
- Database db_;
+ Databases db_;
};
// =================================================================================================