]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
ggml : try fix win32 build (whisper/0)
authorGeorgi Gerganov <redacted>
Fri, 1 May 2026 15:53:30 +0000 (18:53 +0300)
committerGeorgi Gerganov <redacted>
Sat, 2 May 2026 04:22:35 +0000 (07:22 +0300)
ggml/src/ggml.c

index 54d3eae3e4da6166e11e847411c54ed60914e3b5..81343eeb14cee53619e93b8a97fb7732afda444c 100644 (file)
 
 uint64_t ggml_graph_next_uid(void) {
 #ifdef _MSC_VER
+#if defined(_WIN32)
+    static volatile LONG counter = 1;
+    return (uint64_t) InterlockedIncrement(&counter) - 1;
+#else
     static volatile long long counter = 1;
     return (uint64_t) _InterlockedIncrement64(&counter) - 1;
+#endif
 #else
     static uint64_t counter = 1;
     return __atomic_fetch_add(&counter, 1, __ATOMIC_RELAXED);