aboutsummaryrefslogtreecommitdiff
path: root/src/solvers/h48/gendata_cocsep.h
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2024-10-05 23:00:08 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2024-10-05 23:00:08 +0200
commit1272e304b6367c7dd94d25acf88b2843adabb93a (patch)
treee269e86cf131f3d5ed7c03a201418804257be06d /src/solvers/h48/gendata_cocsep.h
parent6f338b97a222dee630c9b13896cf443254667dfb (diff)
downloadnissy-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.h5
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 *);
5STATIC uint32_t gendata_cocsep_dfs(cocsep_dfs_arg_t *); 5STATIC uint32_t gendata_cocsep_dfs(cocsep_dfs_arg_t *);
6STATIC void getdistribution_cocsep(const uint32_t *, uint64_t [static 21]); 6STATIC void getdistribution_cocsep(const uint32_t *, uint64_t [static 21]);
7 7
8STATIC_INLINE int8_t get_h48_cdata(cube_t, const uint32_t *, uint32_t *); 8STATIC_INLINE int8_t get_h48_cdata(
9 cube_t, _Atomic const uint32_t *, uint32_t *);
9 10
10/* 11/*
11Each element of the cocsep table is a uint32_t used as follows: 12Each 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
160STATIC_INLINE int8_t 161STATIC_INLINE int8_t
161get_h48_cdata(cube_t cube, const uint32_t *cocsepdata, uint32_t *cdata) 162get_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

Generated with cgit - Back to sebastiano.tronto.net