mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-06-28 12:25:03 +00:00
ggml : build backends as libraries (#10256)
* ggml : build backends as libraries --------- Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com> Co-authored-by: Georgi Gerganov <ggerganov@gmail.com> Co-authored-by: R0CKSTAR <xiaodong.ye@mthreads.com>
This commit is contained in:
12
ggml/src/ggml-threading.cpp
Normal file
12
ggml/src/ggml-threading.cpp
Normal file
@ -0,0 +1,12 @@
|
||||
#include "ggml-threading.h"
|
||||
#include <mutex>
|
||||
|
||||
std::mutex ggml_critical_section_mutex;
|
||||
|
||||
void ggml_critical_section_start() {
|
||||
ggml_critical_section_mutex.lock();
|
||||
}
|
||||
|
||||
void ggml_critical_section_end(void) {
|
||||
ggml_critical_section_mutex.unlock();
|
||||
}
|
Reference in New Issue
Block a user