diff options
author | Cedric Nugteren <web@cedricnugteren.nl> | 2016-10-10 20:37:45 +0200 |
---|---|---|
committer | Cedric Nugteren <web@cedricnugteren.nl> | 2016-10-10 20:37:45 +0200 |
commit | fcac81bfef1ebe460a99dc0465a0768ede525f1a (patch) | |
tree | d5ad5201da03b385a71d7795c6351ffb044d2b7a /src/database | |
parent | 39afc9543b5d255ac140fb2529a0332813bab39a (diff) |
First fixes towards compilation on Visual Studio 2013
Diffstat (limited to 'src/database')
-rw-r--r-- | src/database/database.cpp | 17 | ||||
-rw-r--r-- | src/database/database.hpp | 17 |
2 files changed, 23 insertions, 11 deletions
diff --git a/src/database/database.cpp b/src/database/database.cpp index df9ac373..1198cefb 100644 --- a/src/database/database.cpp +++ b/src/database/database.cpp @@ -48,6 +48,23 @@ const std::vector<Database::DatabaseEntry> Database::database = { KernelSelectionHalf, KernelSelectionSingle, KernelSelectionDouble, KernelSelectionComplexSingle, KernelSelectionComplexDouble }; +// The OpenCL device types +const std::string Database::kDeviceTypeCPU = "CPU"; +const std::string Database::kDeviceTypeGPU = "GPU"; +const std::string Database::kDeviceTypeAccelerator = "accelerator"; +const std::string Database::kDeviceTypeAll = "default"; + +// The OpenCL device vendors +const std::string Database::kDeviceVendorAll = "default"; + +// Alternative names for some OpenCL vendors +const std::unordered_map<std::string, std::string> Database::kVendorNames{ + { "Intel(R) Corporation", "Intel" }, + { "GenuineIntel", "Intel" }, + { "Advanced Micro Devices, Inc.", "AMD" }, + { "NVIDIA Corporation", "NVIDIA" }, +}; + // ================================================================================================= // Constructor, computing device properties and populating the parameter-vector from the database. diff --git a/src/database/database.hpp b/src/database/database.hpp index 912f0f15..d56ed40b 100644 --- a/src/database/database.hpp +++ b/src/database/database.hpp @@ -51,21 +51,16 @@ class Database { }; // The OpenCL device types - static constexpr auto kDeviceTypeCPU = "CPU"; - static constexpr auto kDeviceTypeGPU = "GPU"; - static constexpr auto kDeviceTypeAccelerator = "accelerator"; - static constexpr auto kDeviceTypeAll = "default"; + static const std::string kDeviceTypeCPU; + static const std::string kDeviceTypeGPU; + static const std::string kDeviceTypeAccelerator; + static const std::string kDeviceTypeAll; // The OpenCL device vendors - static constexpr auto kDeviceVendorAll = "default"; + static const std::string kDeviceVendorAll; // Alternative names for some OpenCL vendors - const std::unordered_map<std::string,std::string> kVendorNames { - {"Intel(R) Corporation", "Intel"}, - {"GenuineIntel", "Intel"}, - {"Advanced Micro Devices, Inc.", "AMD"}, - {"NVIDIA Corporation", "NVIDIA"}, - }; + static const std::unordered_map<std::string, std::string> kVendorNames; // The database consists of separate database entries, stored together in a vector static const DatabaseEntry XaxpyHalf, XaxpySingle, XaxpyDouble, XaxpyComplexSingle, XaxpyComplexDouble; |