mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-27 06:39:25 +01:00
threads: fix msvc build without openmp (#9615)
We're missing atomic_thread_fence() in MSVC builds when openmp is disabled.
This commit is contained in:
parent
116efee0ee
commit
c087b6f11d
@ -135,6 +135,9 @@ static atomic_bool atomic_flag_test_and_set(atomic_flag * ptr) {
|
||||
static void atomic_flag_clear(atomic_flag * ptr) {
|
||||
InterlockedExchange(ptr, 0);
|
||||
}
|
||||
static void atomic_thread_fence(memory_order mo) {
|
||||
MemoryBarrier();
|
||||
}
|
||||
#else // clang
|
||||
#include <stdatomic.h>
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user