summaryrefslogtreecommitdiff
path: root/examples/quantize-stats/quantize-stats.cpp
diff options
context:
space:
mode:
authordivinity76 <divinity76@gmail.com>2024-01-30 10:18:02 +0100
committerGitHub <noreply@github.com>2024-01-30 11:18:02 +0200
commit813416991ab0d1caa0d12f93ac4e8a24a2add0a3 (patch)
tree2fcb1475703a7f01b4cc85281146321d924896e0 /examples/quantize-stats/quantize-stats.cpp
parent5589921ef84a4fb1c6d1c9c34d626a5a83033db6 (diff)
main : allow empty --prompt-cache file (#5176)
* allow empty --prompt-cache file This allows the use of std::tmpnam(), std::tmpfile(), Python's tempfile.NamedTemporaryFile(), and similar create-empty-file API's for the user. I switched from the C fopen API to the C++ filesystem api to get around the fact that, to the best of my knowledge, C has no portable way to get the file size above LONG_MAX, with std::ftell() returning long? fallback to std::ifstream for c++ < 17 (the project is currently targeting C++11 it seems - file_exists() and file_size() can be removed when we upgrade to c++17) * formatting (requested in codereview) * remove c++17, file_is_empty
Diffstat (limited to 'examples/quantize-stats/quantize-stats.cpp')
0 files changed, 0 insertions, 0 deletions