diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-03-25 18:35:47 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-03-25 18:35:47 +0100 |
| commit | 56048d13b73ec6e6a9c59d62e82f41e69a3994bd (patch) | |
| tree | 49fc5d50e739a399897425756c08a73ba5924ddb /src/solvers/h48/solve.h | |
| parent | 0f4931c8de298b0f97aba1757c9538f48adb30c6 (diff) | |
| download | nissy-core-56048d13b73ec6e6a9c59d62e82f41e69a3994bd.tar.gz nissy-core-56048d13b73ec6e6a9c59d62e82f41e69a3994bd.zip | |
More safety with pointers using VLA function parameters
Diffstat (limited to 'src/solvers/h48/solve.h')
| -rw-r--r-- | src/solvers/h48/solve.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/solvers/h48/solve.h b/src/solvers/h48/solve.h index dbd15bb..dcec5a4 100644 --- a/src/solvers/h48/solve.h +++ b/src/solvers/h48/solve.h | |||
| @@ -46,18 +46,18 @@ typedef struct { | |||
| 46 | int8_t *shortest_sol; | 46 | int8_t *shortest_sol; |
| 47 | } dfsarg_solve_h48_maketasks_t; | 47 | } dfsarg_solve_h48_maketasks_t; |
| 48 | 48 | ||
| 49 | STATIC_INLINE bool solve_h48_stop(dfsarg_solve_h48_t *); | 49 | STATIC_INLINE bool solve_h48_stop(dfsarg_solve_h48_t [static 1]); |
| 50 | STATIC int64_t solve_h48_maketasks( | 50 | STATIC int64_t solve_h48_maketasks( |
| 51 | dfsarg_solve_h48_t *, dfsarg_solve_h48_maketasks_t *, | 51 | dfsarg_solve_h48_t [static 1], dfsarg_solve_h48_maketasks_t [static 1], |
| 52 | solve_h48_task_t [static STARTING_CUBES], int *); | 52 | solve_h48_task_t [static STARTING_CUBES], int [static 1]); |
| 53 | STATIC void *solve_h48_runthread(void *); | 53 | STATIC void *solve_h48_runthread(void *); |
| 54 | STATIC int64_t solve_h48_dfs(dfsarg_solve_h48_t *); | 54 | STATIC int64_t solve_h48_dfs(dfsarg_solve_h48_t [static 1]); |
| 55 | STATIC int64_t solve_h48(cube_t, int8_t, int8_t, uint64_t, int8_t, int8_t, | 55 | STATIC int64_t solve_h48(cube_t, int8_t, int8_t, uint64_t, int8_t, int8_t, |
| 56 | uint64_t, const void *, size_t n, char [n], | 56 | uint64_t, const void *, size_t n, char [n], |
| 57 | long long [static NISSY_SIZE_SOLVE_STATS]); | 57 | long long [static NISSY_SIZE_SOLVE_STATS]); |
| 58 | 58 | ||
| 59 | STATIC_INLINE bool | 59 | STATIC_INLINE bool |
| 60 | solve_h48_stop(dfsarg_solve_h48_t *arg) | 60 | solve_h48_stop(dfsarg_solve_h48_t arg[static 1]) |
| 61 | { | 61 | { |
| 62 | uint32_t data, data_inv; | 62 | uint32_t data, data_inv; |
| 63 | int64_t coord; | 63 | int64_t coord; |
| @@ -145,7 +145,7 @@ solve_h48_stop(dfsarg_solve_h48_t *arg) | |||
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | STATIC int64_t | 147 | STATIC int64_t |
| 148 | solve_h48_dfs(dfsarg_solve_h48_t *arg) | 148 | solve_h48_dfs(dfsarg_solve_h48_t arg[static 1]) |
| 149 | { | 149 | { |
| 150 | int64_t ret, n; | 150 | int64_t ret, n; |
| 151 | uint8_t m, nm, lbn, lbi; | 151 | uint8_t m, nm, lbn, lbi; |
| @@ -261,10 +261,10 @@ solve_h48_runthread(void *arg) | |||
| 261 | 261 | ||
| 262 | STATIC int64_t | 262 | STATIC int64_t |
| 263 | solve_h48_maketasks( | 263 | solve_h48_maketasks( |
| 264 | dfsarg_solve_h48_t *solve_arg, | 264 | dfsarg_solve_h48_t solve_arg[static 1], |
| 265 | dfsarg_solve_h48_maketasks_t *maketasks_arg, | 265 | dfsarg_solve_h48_maketasks_t maketasks_arg[static 1], |
| 266 | solve_h48_task_t tasks[static STARTING_CUBES], | 266 | solve_h48_task_t tasks[static STARTING_CUBES], |
| 267 | int *ntasks | 267 | int ntasks[static 1] |
| 268 | ) | 268 | ) |
| 269 | { | 269 | { |
| 270 | int r; | 270 | int r; |
