diff options
author | Ivan Shapovalov <intelfx@intelfx.name> | 2016-11-28 04:23:01 +0300 |
---|---|---|
committer | Ivan Shapovalov <intelfx@intelfx.name> | 2017-01-24 11:56:15 +0300 |
commit | 50e758a007b3a4e5700fbe5ef207bbb26b1fccf5 (patch) | |
tree | 1600b061a7d47d9d266c52ecdf8883c26e55060e /src/cache.hpp | |
parent | 6dc18c1c57d5fef75e7682b1fdb8268ec3786908 (diff) |
Routine: cache the database instance as well
This does not change much, but will become useful in next commits when
plugin support is introduced.
Diffstat (limited to 'src/cache.hpp')
-rw-r--r-- | src/cache.hpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/cache.hpp b/src/cache.hpp index 25d6f076..c3675f07 100644 --- a/src/cache.hpp +++ b/src/cache.hpp @@ -86,6 +86,20 @@ extern template class Cache<ProgramKey, Program>; extern template Program ProgramCache::Get(const ProgramKeyRef &, bool *) const; // ================================================================================================= + +class Database; + +// The key struct for the cache of database maps. +// Order of fields: precision, device_name, routines (smaller fields first) +typedef std::tuple<Precision, std::string, std::vector<std::string>> DatabaseKey; +typedef std::tuple<const Precision &, const std::string &, const std::vector<std::string> &> DatabaseKeyRef; + +typedef Cache<DatabaseKey, Database> DatabaseCache; + +extern template class Cache<DatabaseKey, Database>; +extern template Database DatabaseCache::Get(const DatabaseKeyRef &, bool *) const; + +// ================================================================================================= } // namespace clblast // CLBLAST_CACHE_H_ |