Patch 1: Added threading for non posix systems
This commit is contained in:
parent
ec59387899
commit
61cd520cd6
1 changed files with 5 additions and 2 deletions
7
ggml.h
7
ggml.h
|
@ -777,10 +777,13 @@ int ggml_cpu_has_vsx(void);
|
|||
// threading for non posix systems
|
||||
//
|
||||
#ifndef _POSIX_THREADS
|
||||
#if defined(_WIN32)
|
||||
#include <windows.h>
|
||||
#endif
|
||||
typedef HANDLE pthread_t;
|
||||
typedef DWORD thread_ret_t;
|
||||
int pthread_create(pthread_t* out, void* unused, thread_ret_t(*func)(void*), void* arg);
|
||||
int pthread_join(pthread_t thread, void* unused);
|
||||
static int pthread_create(pthread_t* out, void* unused, thread_ret_t(*func)(void*), void* arg);
|
||||
static int pthread_join(pthread_t thread, void* unused);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue