Download src/llama-io.cpp from Brunobkr/llama.cpp_AlgMor24_github: direct link, hf CLI and curl.
- Browser
- Download file 447 Bytes
-
https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github/resolve/9f63da05cd17e144eb118af61a784286378961ba/src/llama-io.cpp
- Command line
-
hf download hf://datasets/Brunobkr/llama.cpp_AlgMor24_github@9f63da05cd17e144eb118af61a784286378961ba/src/llama-io.cpp
-
curl -L -o llama-io.cpp https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github/resolve/9f63da05cd17e144eb118af61a784286378961ba/src/llama-io.cpp
447 Bytes
| void llama_io_write_i::write_string(const std::string & str) { | |
| uint32_t str_size = str.size(); | |
| write(&str_size, sizeof(str_size)); | |
| write(str.data(), str_size); | |
| } | |
| void llama_io_read_i::read_string(std::string & str) { | |
| uint32_t str_size; | |
| read(&str_size, sizeof(str_size)); | |
| std::vector<char> buf(str_size); | |
| read(buf.data(), str_size); | |
| str.assign(buf.data(), str_size); | |
| } | |