diff options
author | Ivan Shapovalov <intelfx@intelfx.name> | 2016-07-02 02:38:48 +0300 |
---|---|---|
committer | Ivan Shapovalov <intelfx@intelfx.name> | 2016-08-27 05:37:26 +0300 |
commit | ea43936e94fdf2eabb913c1ebc1ac6143bde5bba (patch) | |
tree | 472e138c8e5d1ca1dc3612030fe775414662845d /src/utilities.hpp | |
parent | 8d6a6a5bbf7811d7dff799ed8c1c12d63bca19db (diff) |
test/correctness: read platform and device from environment
Support passing environment variables CLBLAST_PLATFORM and CLBLAST_DEVICE
instead of -platform and -device arguments to test executables.
This is for `ctest`.
Diffstat (limited to 'src/utilities.hpp')
-rw-r--r-- | src/utilities.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/utilities.hpp b/src/utilities.hpp index 700d30d6..75bd5a69 100644 --- a/src/utilities.hpp +++ b/src/utilities.hpp @@ -187,6 +187,10 @@ std::string ToString(T value); template <typename T> T ConvertArgument(const char* value); +// Variant of "ConvertArgument" with default values +template <typename T> +T ConvertArgument(const char* value, T default_value); + // Basic argument parser, matching patterns in the form of "-option value" and "--option value" template <typename T> T GetArgument(const int argc, char **argv, std::string &help, |