Patch 1: Added threading for non posix systems

This commit is contained in:
CoderRC 2023-04-03 00:53:39 -04:00 committed by GitHub
parent ec59387899
commit 61cd520cd6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

7
ggml.h
View file

@ -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