Commit 41767c20 authored by Adam P. Goucher's avatar Adam P. Goucher

Streamlife changes

parent 9f4d4493
#pragma once
#include "lifetree.h"
#include "avxlife/directions.h"
#define BESZEL 0
#define ULQOMA 1
namespace apg {
template<typename I>
......@@ -175,7 +171,6 @@ namespace apg {
if (is_solitonic(hnode, rule)) {
// BESZEL and ULQOMA tiles are provably non-interacting:
I i1 = iterate_recurse1(part1, mantissa, exponent, rule, history);
I i2 = iterate_recurse1(part2, mantissa, exponent, rule, history);
return hypernode<I>(i1, i2, hnode.depth - 1);
......@@ -183,7 +178,8 @@ namespace apg {
} else {
uint64_t hrule = (rule << 1) + (history & 1);
I gcdesc = ((1 + exponent) << 7) | (hrule << 3) | (mantissa - 1);
uint64_t effexp = (hnode.depth < (1 + exponent)) ? hnode.depth : (1 + exponent);
I gcdesc = (effexp << 7) | (hrule << 3) | (mantissa - 1);
nicearray<I, 4> k = {hnode.index, hnode.index2, hnode.depth, gcdesc};
I p = biresults.getnode(k, false);
......@@ -235,7 +231,9 @@ namespace apg {
nicearray<I, 2> v = {res.index, res.index2};
p = biresults.setnode(k, v);
}
auto xptr = biresults.ind2ptr(p);
return hypernode<I>(xptr->value.x[0], xptr->value.x[1], hnode.depth - 1);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment