diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-08-12 09:36:36 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-08-12 09:36:36 +0100 |
| commit | 50bd8f0f568120e554d416f474cc72247d0b3240 (patch) | |
| tree | 236b8ebed5af17f8220981deffd69b97f0d08fe7 /src/solvers/distribution.h | |
| parent | 315d0f118f3d5ec2578249182f7b0eebf99d2943 (diff) | |
| parent | b36ed11e322152ff9ab813af78a08c35b42d5f94 (diff) | |
| download | nissy-core-50bd8f0f568120e554d416f474cc72247d0b3240.tar.gz nissy-core-50bd8f0f568120e554d416f474cc72247d0b3240.zip | |
Merge branch 'master' of https://github.com/sebastianotronto/nissy-core into windows
Diffstat (limited to 'src/solvers/distribution.h')
| -rw-r--r-- | src/solvers/distribution.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/solvers/distribution.h b/src/solvers/distribution.h index 27b72d7..4cb7157 100644 --- a/src/solvers/distribution.h +++ b/src/solvers/distribution.h | |||
| @@ -43,7 +43,7 @@ getdistribution( | |||
| 43 | const tableinfo_t info[static 1] | 43 | const tableinfo_t info[static 1] |
| 44 | ) { | 44 | ) { |
| 45 | getdistribution_data_t targ[THREADS]; | 45 | getdistribution_data_t targ[THREADS]; |
| 46 | pthread_t thread[THREADS]; | 46 | wrapthread_define_var_thread_t(thread[THREADS]); |
| 47 | uint8_t pval, k; | 47 | uint8_t pval, k; |
| 48 | uint64_t local_distr[THREADS][INFO_DISTRIBUTION_LEN]; | 48 | uint64_t local_distr[THREADS][INFO_DISTRIBUTION_LEN]; |
| 49 | uint64_t i, j, nbytes, sz, epb; | 49 | uint64_t i, j, nbytes, sz, epb; |
| @@ -60,12 +60,12 @@ getdistribution( | |||
| 60 | .distr = local_distr[i], | 60 | .distr = local_distr[i], |
| 61 | .table = table, | 61 | .table = table, |
| 62 | }; | 62 | }; |
| 63 | pthread_create(&thread[i], NULL, | 63 | wrapthread_create(&thread[i], NULL, |
| 64 | getdistribution_runthread, &targ[i]); | 64 | getdistribution_runthread, &targ[i]); |
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | for (i = 0; i < THREADS; i++) | 67 | for (i = 0; i < THREADS; i++) |
| 68 | pthread_join(thread[i], NULL); | 68 | wrapthread_join(thread[i], NULL); |
| 69 | 69 | ||
| 70 | memset(distr, 0, INFO_DISTRIBUTION_LEN * sizeof(uint64_t)); | 70 | memset(distr, 0, INFO_DISTRIBUTION_LEN * sizeof(uint64_t)); |
| 71 | for (i = 0; i < THREADS; i++) | 71 | for (i = 0; i < THREADS; i++) |
