]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
ggml : portability fixes for VS 2017 (#12150)
authormgroeber9110 <redacted>
Tue, 4 Mar 2025 16:53:26 +0000 (17:53 +0100)
committerGitHub <redacted>
Tue, 4 Mar 2025 16:53:26 +0000 (18:53 +0200)
commit5bbe6a9fe9a8796a9389c85accec89dbc4d91e39
treef93659d8874c2381812bb874625321e60212cd1b
parent20a9b8f5e1380243ed03aeb50ae1bf94b8d68501
ggml : portability fixes for VS 2017 (#12150)

* Add include files for std::min/max and std::toupper/tolower

* win32: move _USE_MATH_DEFINES before includes to ensure M_PI is defined

* Use GGML_RESTRICT instead of "restrict" keyword everywhere, and use "__restrict" in MSVC plain C mode

* win32: only use __restrict in MSVC if C11/C17 support is not enabled

---------

Co-authored-by: Marcus Groeber <redacted>
20 files changed:
common/ngram-cache.cpp
common/sampling.cpp
common/speculative.cpp
examples/embedding/embedding.cpp
examples/lookahead/lookahead.cpp
examples/parallel/parallel.cpp
examples/passkey/passkey.cpp
examples/quantize/quantize.cpp
examples/tts/tts.cpp
ggml/include/ggml.h
ggml/src/ggml-backend-reg.cpp
ggml/src/ggml-backend.cpp
ggml/src/ggml-cpu/ggml-cpu-quants.c
ggml/src/ggml-cpu/ggml-cpu.c
ggml/src/ggml-quants.c
ggml/src/ggml.c
src/llama-chat.cpp
src/llama-kv-cache.h
src/llama-mmap.cpp
src/llama-vocab.cpp