itersolve: Add kinematic iterative solver code

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2018-06-08 19:55:24 -04:00
parent ba3428822d
commit 2511471b0d
5 changed files with 315 additions and 4 deletions

View File

@@ -389,6 +389,12 @@ stepcompress_get_oid(struct stepcompress *sc)
return sc->oid;
}
int
stepcompress_get_step_dir(struct stepcompress *sc)
{
return sc->sdir;
}
/****************************************************************
* Queue management
@@ -485,6 +491,22 @@ queue_append(struct queue_append *qa, double step_clock)
return 0;
}
inline int
queue_append_set_next_step_dir(struct queue_append *qa, int sdir)
{
struct stepcompress *sc = qa->sc;
uint64_t old_last_step_clock = sc->last_step_clock;
sc->queue_next = qa->qnext;
int ret = set_next_step_dir(sc, sdir);
if (ret)
return ret;
qa->qnext = sc->queue_next;
qa->qend = sc->queue_end;
qa->last_step_clock_32 = sc->last_step_clock;
qa->clock_offset -= sc->last_step_clock - old_last_step_clock;
return 0;
}
/****************************************************************
* Step compress synchronization