Skip to content

Commit c087b6f

Browse files
threads: fix msvc build without openmp (#9615)
We're missing atomic_thread_fence() in MSVC builds when openmp is disabled.
1 parent 116efee commit c087b6f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ggml/src/ggml.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,9 @@ static atomic_bool atomic_flag_test_and_set(atomic_flag * ptr) {
135135
static void atomic_flag_clear(atomic_flag * ptr) {
136136
InterlockedExchange(ptr, 0);
137137
}
138+
static void atomic_thread_fence(memory_order mo) {
139+
MemoryBarrier();
140+
}
138141
#else // clang
139142
#include <stdatomic.h>
140143
#endif

0 commit comments

Comments
 (0)