From 2c291aed4bb80f07e8557284d3399cf1e2a4ccb9 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Sun, 1 Mar 2026 18:09:44 +0100 Subject: Improve Windows build support. - Use multithreading (works with a sufficiently recent version of the Microsoft developer tools / C SDK). - Detect CPU architecture and use AVX2 or NEON when appropriate. - Automatically detect python installation path. --- src/solvers/h48/distribution_h48.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/solvers/h48/distribution_h48.h') diff --git a/src/solvers/h48/distribution_h48.h b/src/solvers/h48/distribution_h48.h index 93a6933..80c946e 100644 --- a/src/solvers/h48/distribution_h48.h +++ b/src/solvers/h48/distribution_h48.h @@ -4,11 +4,11 @@ needed for H48 because of the intertwined fallback table, and it is easier to have some duplication than to make these functions needlessly generic. */ -STATIC void *getdistribution_h48_runthread(void *); +STATIC wrapthread_return_t getdistribution_h48_runthread(void *); STATIC void getdistribution_h48(const unsigned char *, uint64_t [static INFO_DISTRIBUTION_LEN], const tableinfo_t [static 1]); -STATIC void * +STATIC wrapthread_return_t getdistribution_h48_runthread(void *arg) { getdistribution_data_t *data = (getdistribution_data_t *)arg; @@ -33,7 +33,7 @@ getdistribution_h48_runthread(void *arg) data->distr[(t & (m << (3*k))) >> (3*k)]--; } - return NULL; + return wrapthread_return_val; } STATIC void @@ -58,12 +58,12 @@ getdistribution_h48( .distr = local_distr[i], .table = table, }; - wrapthread_create(&thread[i], NULL, + wrapthread_create(&thread[i], getdistribution_h48_runthread, &targ[i]); } for (i = 0; i < THREADS; i++) - wrapthread_join(thread[i], NULL); + wrapthread_join(thread[i]); memset(distr, 0, INFO_DISTRIBUTION_LEN * sizeof(uint64_t)); for (i = 0; i < THREADS; i++) -- cgit v1.3