diff options
| author | Paul Oliver <contact@pauloliver.dev> | 2026-06-18 00:08:54 +0200 |
|---|---|---|
| committer | Paul Oliver <contact@pauloliver.dev> | 2026-06-25 00:15:17 +0200 |
| commit | 0f5581f53f73a92d33826c4771553a9683376e67 (patch) | |
| tree | eab8172d21dc4a0b36714af541d22a82cec858f3 /core/salis.c | |
| parent | 00a0cb3821ce2bd0fc589ae64ed9cbb791ce44bb (diff) | |
Adds unit testing scaffold and build tests
Diffstat (limited to 'core/salis.c')
| -rw-r--r-- | core/salis.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/core/salis.c b/core/salis.c index 9f9a3d0..dac9e52 100644 --- a/core/salis.c +++ b/core/salis.c @@ -310,6 +310,7 @@ uint64_t mvec_get_owner(const struct Core *core, uint64_t addr) { // ---------------------------------------------------------------------------- // [section] mutator functions // ---------------------------------------------------------------------------- +#if SEED != 0 #if defined(COMMAND_NEW) uint64_t muta_smix(uint64_t *seed) { assert(seed); @@ -357,6 +358,7 @@ void muta_cosmic_ray(struct Core *core) { #endif } } +#endif // ---------------------------------------------------------------------------- // [section] process functions @@ -491,12 +493,15 @@ void core_init(struct Core *core, uint64_t *seed) { assert(core); assert(seed); - if (*seed) { - core->muta[0] = muta_smix(seed); - core->muta[1] = muta_smix(seed); - core->muta[2] = muta_smix(seed); - core->muta[3] = muta_smix(seed); - } +#if SEED != 0 + assert(*seed); + core->muta[0] = muta_smix(seed); + core->muta[1] = muta_smix(seed); + core->muta[2] = muta_smix(seed); + core->muta[3] = muta_smix(seed); +#else + (void)seed; +#endif core->pnum = CLONES; core->pcap = CLONES; @@ -642,7 +647,9 @@ void core_step(struct Core *core) { proc_kill(core); } +#if SEED != 0 muta_cosmic_ray(core); +#endif core_step(core); } |
