Download gemma.cpp/build/_deps/benchmark-src/src/string_util.h from ZeroWw/gemma-2-9b-SBS: direct link, hf CLI and curl.
- Browser
- Download file 2 kB
-
https://huggingface.co/ZeroWw/gemma-2-9b-SBS/resolve/main/gemma.cpp/build/_deps/benchmark-src/src/string_util.h
- Command line
-
hf download hf://ZeroWw/gemma-2-9b-SBS/gemma.cpp/build/_deps/benchmark-src/src/string_util.h
-
curl -L -o string_util.h https://huggingface.co/ZeroWw/gemma-2-9b-SBS/resolve/main/gemma.cpp/build/_deps/benchmark-src/src/string_util.h
2 kB
| namespace benchmark { | |
| void AppendHumanReadable(int n, std::string* str); | |
| std::string HumanReadableNumber(double n, double one_k = 1024.0); | |
| BENCHMARK_EXPORT | |
| __attribute__((format(__MINGW_PRINTF_FORMAT, 1, 2))) | |
| __attribute__((format(printf, 1, 2))) | |
| std::string | |
| StrFormat(const char* format, ...); | |
| inline std::ostream& StrCatImp(std::ostream& out) BENCHMARK_NOEXCEPT { | |
| return out; | |
| } | |
| template <class First, class... Rest> | |
| inline std::ostream& StrCatImp(std::ostream& out, First&& f, Rest&&... rest) { | |
| out << std::forward<First>(f); | |
| return StrCatImp(out, std::forward<Rest>(rest)...); | |
| } | |
| template <class... Args> | |
| inline std::string StrCat(Args&&... args) { | |
| std::ostringstream ss; | |
| StrCatImp(ss, std::forward<Args>(args)...); | |
| return ss.str(); | |
| } | |
| BENCHMARK_EXPORT | |
| std::vector<std::string> StrSplit(const std::string& str, char delim); | |
| // Disable lint checking for this block since it re-implements C functions. | |
| // NOLINTBEGIN | |
| /* | |
| * GNU STL in Android NDK lacks support for some C++11 functions, including | |
| * stoul, stoi, stod. We reimplement them here using C functions strtoul, | |
| * strtol, strtod. Note that reimplemented functions are in benchmark:: | |
| * namespace, not std:: namespace. | |
| */ | |
| unsigned long stoul(const std::string& str, size_t* pos = nullptr, | |
| int base = 10); | |
| int stoi(const std::string& str, size_t* pos = nullptr, int base = 10); | |
| double stod(const std::string& str, size_t* pos = nullptr); | |
| using std::stod; // NOLINT(misc-unused-using-decls) | |
| using std::stoi; // NOLINT(misc-unused-using-decls) | |
| using std::stoul; // NOLINT(misc-unused-using-decls) | |
| // NOLINTEND | |
| } // end namespace benchmark | |