ggml : try fix win32 build (whisper/0)
This commit is contained in:
@@ -55,8 +55,13 @@
|
|||||||
|
|
||||||
uint64_t ggml_graph_next_uid(void) {
|
uint64_t ggml_graph_next_uid(void) {
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
#if defined(_WIN32)
|
||||||
|
static volatile LONG counter = 1;
|
||||||
|
return (uint64_t) InterlockedIncrement(&counter) - 1;
|
||||||
|
#else
|
||||||
static volatile long long counter = 1;
|
static volatile long long counter = 1;
|
||||||
return (uint64_t) _InterlockedIncrement64(&counter) - 1;
|
return (uint64_t) _InterlockedIncrement64(&counter) - 1;
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
static uint64_t counter = 1;
|
static uint64_t counter = 1;
|
||||||
return __atomic_fetch_add(&counter, 1, __ATOMIC_RELAXED);
|
return __atomic_fetch_add(&counter, 1, __ATOMIC_RELAXED);
|
||||||
|
|||||||
Reference in New Issue
Block a user