diff options
author | Cedric Nugteren <web@cedricnugteren.nl> | 2016-01-30 11:43:21 +0100 |
---|---|---|
committer | Cedric Nugteren <web@cedricnugteren.nl> | 2016-01-30 11:43:21 +0100 |
commit | 276e772a2c672ad868ba57e06d55e4991c793207 (patch) | |
tree | 015c32f78022e65403dc207c80d2b52458363f68 /src/database.cc | |
parent | 76c91480303dd398b4ff5953a833e493b1409630 (diff) |
Added first auto-generated database headers from the Python database; only K40 and Iris supported now
Diffstat (limited to 'src/database.cc')
-rw-r--r-- | src/database.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/database.cc b/src/database.cc index b7275dad..7f5ac6eb 100644 --- a/src/database.cc +++ b/src/database.cc @@ -34,8 +34,8 @@ const std::vector<Database::DatabaseEntry> Database::database = { XgemmSingle, XgemmDouble, XgemmComplexSingle, XgemmComplexDouble, CopySingle, CopyDouble, CopyComplexSingle, CopyComplexDouble, PadSingle, PadDouble, PadComplexSingle, PadComplexDouble, - TraSingle, TraDouble, TraComplexSingle, TraComplexDouble, - PadTraSingle, PadTraDouble, PadTraComplexSingle, PadTraComplexDouble + TransposeSingle, TransposeDouble, TransposeComplexSingle, TransposeComplexDouble, + PadtransposeSingle, PadtransposeDouble, PadtransposeComplexSingle, PadtransposeComplexDouble }; // ================================================================================================= @@ -78,6 +78,7 @@ Database::Parameters Database::Search(const std::string &this_kernel, const std::string &this_device, const Precision this_precision) const { for (auto &db: database) { + if (db.kernel == this_kernel && db.precision == this_precision) { // Searches for the right vendor and device type, or selects the default if unavailable. This @@ -89,7 +90,8 @@ Database::Parameters Database::Search(const std::string &this_kernel, // Searches for the right device. If the current device is unavailable, selects the vendor // default parameters. This assumes the default is last in the database. for (auto &device: vendor.devices) { - if (device.name == this_device || device.name == kDefaultDevice) { + + if (device.name == this_device || device.name == "default") { // Sets the parameters accordingly return device.parameters; |