Added threading for non posix systems

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

10
ggml.h
View file

@ -773,6 +773,16 @@ int ggml_cpu_has_blas(void);
int ggml_cpu_has_sse3(void); int ggml_cpu_has_sse3(void);
int ggml_cpu_has_vsx(void); int ggml_cpu_has_vsx(void);
//
// threading for non posix systems
//
#ifndef _POSIX_THREADS
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);
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif