diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b1778b18..d40d1f25 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,6 +26,8 @@ jobs: id: cuda-toolkit with: cuda: '12.4.1' + method: 'network' + sub-packages: '["nvcc"]' if: matrix.os != 'macOS-latest' - name: Clippy Check diff --git a/src/hvm.c b/src/hvm.c index c857359f..897fbcb4 100644 --- a/src/hvm.c +++ b/src/hvm.c @@ -1,10 +1,16 @@ #include #include -#include #ifdef _WIN32 #include +#include #else #include +typedef pthread_t thrd_t; +typedef void* thrd_start_t; +#define thrd_create(a, b, c) pthread_create(a, NULL, b, c) +#define thrd_join(a, b) pthread_join(a, b) +#define thrd_yield() sched_yield() +#define thrd_sleep(a, b) nanosleep(a, b) #endif #include #include @@ -662,7 +668,7 @@ static inline void net_init(Net* net) { // is that needed? atomic_store(&net->itrs, 0); atomic_store(&net->idle, 0); - + // allocates global buffers net->node_buf = malloc(G_NODE_LEN * sizeof(APair)); net->vars_buf = malloc(G_VARS_LEN * sizeof(APort));