diff options
author | Ivan Shapovalov <intelfx@intelfx.name> | 2016-12-19 11:04:52 +0300 |
---|---|---|
committer | Ivan Shapovalov <intelfx@intelfx.name> | 2017-01-24 12:18:14 +0300 |
commit | 5fb1da1a0f09d825e5ddfd1e9bd422a8d74f2c5f (patch) | |
tree | 55f356ce1dc2bf8c8c94a6442ef6ed7c6bc5c63d /src | |
parent | 50e758a007b3a4e5700fbe5ef207bbb26b1fccf5 (diff) |
Database: pass Device instead of Queue for clarity
Diffstat (limited to 'src')
-rw-r--r-- | src/database/database.cpp | 3 | ||||
-rw-r--r-- | src/database/database.hpp | 2 | ||||
-rw-r--r-- | src/routine.cpp | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/src/database/database.cpp b/src/database/database.cpp index 9b4e8119..c1cb9d56 100644 --- a/src/database/database.cpp +++ b/src/database/database.cpp @@ -63,12 +63,11 @@ const std::unordered_map<std::string, std::string> Database::kVendorNames{ // Constructor, computing device properties and populating the parameter-vector from the database. // This takes an optional overlay database in case of custom tuning or custom kernels. -Database::Database(const Queue &queue, const std::vector<std::string> &kernels, +Database::Database(const Device &device, const std::vector<std::string> &kernels, const Precision precision, const std::vector<const DatabaseEntry*> &overlay): parameters_(std::make_shared<Parameters>()) { // Finds information of the current device - auto device = queue.GetDevice(); auto device_type = device.Type(); auto device_vendor = device.Vendor(); auto device_name = device.Name(); diff --git a/src/database/database.hpp b/src/database/database.hpp index 92fb383c..87c12293 100644 --- a/src/database/database.hpp +++ b/src/database/database.hpp @@ -75,7 +75,7 @@ class Database { Database() = default; // The constructor with a user-provided database overlay (potentially an empty vector) - explicit Database(const Queue &queue, const std::vector<std::string> &routines, + explicit Database(const Device &device, const std::vector<std::string> &routines, const Precision precision, const std::vector<const DatabaseEntry*> &overlay); // Accessor of values by key diff --git a/src/routine.cpp b/src/routine.cpp index b36a1ecd..4fe04a60 100644 --- a/src/routine.cpp +++ b/src/routine.cpp @@ -48,7 +48,7 @@ void Routine::InitDatabase(const std::vector<std::string> &routines, if (has_db) { return; } // Builds the parameter database for this device and routine set and stores it in the cache - db_ = Database(queue_, routines, precision_, userDatabase); + db_ = Database(device_, routines, precision_, userDatabase); DatabaseCache::Instance().Store(DatabaseKey{ precision_, device_name_, routines }, Database{ db_ }); } |