diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2024-10-05 23:00:08 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2024-10-05 23:00:08 +0200 |
| commit | 1272e304b6367c7dd94d25acf88b2843adabb93a (patch) | |
| tree | e269e86cf131f3d5ed7c03a201418804257be06d /src/solvers/h48/gendata_cocsep.h | |
| parent | 6f338b97a222dee630c9b13896cf443254667dfb (diff) | |
| download | nissy-core-1272e304b6367c7dd94d25acf88b2843adabb93a.tar.gz nissy-core-1272e304b6367c7dd94d25acf88b2843adabb93a.zip | |
Fix rare data race
I had some misconception about how _Atomic and const worked.
This means the previous commit (expected distribution) could
be incorrect.
Diffstat (limited to 'src/solvers/h48/gendata_cocsep.h')
| -rw-r--r-- | src/solvers/h48/gendata_cocsep.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/solvers/h48/gendata_cocsep.h b/src/solvers/h48/gendata_cocsep.h index a8142b4..fd483ce 100644 --- a/src/solvers/h48/gendata_cocsep.h +++ b/src/solvers/h48/gendata_cocsep.h | |||
| @@ -5,7 +5,8 @@ STATIC size_t gendata_cocsep(void *, uint64_t *, cube_t *); | |||
| 5 | STATIC uint32_t gendata_cocsep_dfs(cocsep_dfs_arg_t *); | 5 | STATIC uint32_t gendata_cocsep_dfs(cocsep_dfs_arg_t *); |
| 6 | STATIC void getdistribution_cocsep(const uint32_t *, uint64_t [static 21]); | 6 | STATIC void getdistribution_cocsep(const uint32_t *, uint64_t [static 21]); |
| 7 | 7 | ||
| 8 | STATIC_INLINE int8_t get_h48_cdata(cube_t, const uint32_t *, uint32_t *); | 8 | STATIC_INLINE int8_t get_h48_cdata( |
| 9 | cube_t, _Atomic const uint32_t *, uint32_t *); | ||
| 9 | 10 | ||
| 10 | /* | 11 | /* |
| 11 | Each element of the cocsep table is a uint32_t used as follows: | 12 | Each element of the cocsep table is a uint32_t used as follows: |
| @@ -158,7 +159,7 @@ set_visited(uint8_t *a, int64_t i) | |||
| 158 | } | 159 | } |
| 159 | 160 | ||
| 160 | STATIC_INLINE int8_t | 161 | STATIC_INLINE int8_t |
| 161 | get_h48_cdata(cube_t cube, const uint32_t *cocsepdata, uint32_t *cdata) | 162 | get_h48_cdata(cube_t cube, _Atomic const uint32_t *cocsepdata, uint32_t *cdata) |
| 162 | { | 163 | { |
| 163 | int64_t coord; | 164 | int64_t coord; |
| 164 | 165 | ||
