Download dependencies/libcudacxx/libcxx/utils/google-benchmark/src/commandlineflags.h from camenduru/thrust: direct link, hf CLI and curl.
- Browser
- Download file 3.2 kB
-
https://huggingface.co/camenduru/thrust/resolve/main/dependencies/libcudacxx/libcxx/utils/google-benchmark/src/commandlineflags.h
- Command line
-
hf download hf://camenduru/thrust/dependencies/libcudacxx/libcxx/utils/google-benchmark/src/commandlineflags.h
-
curl -L -o commandlineflags.h https://huggingface.co/camenduru/thrust/resolve/main/dependencies/libcudacxx/libcxx/utils/google-benchmark/src/commandlineflags.h
3.2 kB
| // Macro for referencing flags. | |
| // Macros for declaring flags. | |
| // Macros for defining flags. | |
| namespace benchmark { | |
| // Parses 'str' for a 32-bit signed integer. If successful, writes the result | |
| // to *value and returns true; otherwise leaves *value unchanged and returns | |
| // false. | |
| bool ParseInt32(const std::string& src_text, const char* str, int32_t* value); | |
| // Parses a bool/Int32/string from the environment variable | |
| // corresponding to the given Google Test flag. | |
| bool BoolFromEnv(const char* flag, bool default_val); | |
| int32_t Int32FromEnv(const char* flag, int32_t default_val); | |
| double DoubleFromEnv(const char* flag, double default_val); | |
| const char* StringFromEnv(const char* flag, const char* default_val); | |
| // Parses a string for a bool flag, in the form of either | |
| // "--flag=value" or "--flag". | |
| // | |
| // In the former case, the value is taken as true if it passes IsTruthyValue(). | |
| // | |
| // In the latter case, the value is taken as true. | |
| // | |
| // On success, stores the value of the flag in *value, and returns | |
| // true. On failure, returns false without changing *value. | |
| bool ParseBoolFlag(const char* str, const char* flag, bool* value); | |
| // Parses a string for an Int32 flag, in the form of | |
| // "--flag=value". | |
| // | |
| // On success, stores the value of the flag in *value, and returns | |
| // true. On failure, returns false without changing *value. | |
| bool ParseInt32Flag(const char* str, const char* flag, int32_t* value); | |
| // Parses a string for a Double flag, in the form of | |
| // "--flag=value". | |
| // | |
| // On success, stores the value of the flag in *value, and returns | |
| // true. On failure, returns false without changing *value. | |
| bool ParseDoubleFlag(const char* str, const char* flag, double* value); | |
| // Parses a string for a string flag, in the form of | |
| // "--flag=value". | |
| // | |
| // On success, stores the value of the flag in *value, and returns | |
| // true. On failure, returns false without changing *value. | |
| bool ParseStringFlag(const char* str, const char* flag, std::string* value); | |
| // Returns true if the string matches the flag. | |
| bool IsFlag(const char* str, const char* flag); | |
| // Returns true unless value starts with one of: '0', 'f', 'F', 'n' or 'N', or | |
| // some non-alphanumeric character. As a special case, also returns true if | |
| // value is the empty string. | |
| bool IsTruthyFlagValue(const std::string& value); | |
| } // end namespace benchmark | |