From 6edade339744b6631717242b0111f5dc1ae79194 Mon Sep 17 00:00:00 2001 From: Paul Oliver Date: Fri, 13 Sep 2024 15:14:30 -0700 Subject: Allow cloning ancestor multiple times on each core --- src/salis.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/salis.c') diff --git a/src/salis.c b/src/salis.c index 24f3966..814dd0d 100644 --- a/src/salis.c +++ b/src/salis.c @@ -316,8 +316,13 @@ u64 core_assemble_ancestor(int cix, const char *anc) { for (int i = 0; i < 0x100; ++i) { if (strcmp(line, g_mnemo_table[i]) == 0) { - mvec_alloc(core, addr); - mvec_set_inst(core, addr, i); + for (u64 j = 0; j < ANC_CLONES; ++j) { + u64 addr_clone = addr + ((MVEC_SIZE / ANC_CLONES) * j); + + mvec_alloc(core, addr_clone); + mvec_set_inst(core, addr_clone, i); + } + #ifndef NDEBUG line_ok = true; #endif @@ -347,8 +352,9 @@ void core_init(int cix, u64 *seed, const char *anc) { core->muta[3] = muta_smix(seed); } - core->pnum = 1; - core->pcap = 1; + core->pnum = ANC_CLONES; + core->pcap = ANC_CLONES; + core->plst = ANC_CLONES - 1; core->iviv = calloc(SYNC_INTERVAL, sizeof(u8)); core->ivav = calloc(SYNC_INTERVAL, sizeof(u64)); core->pvec = calloc(core->pcap, sizeof(Proc)); -- cgit v1.2.1