No matching definitions.

ecs/xstage

src/ecs/xstage.tur

cross-world (N-world) system scheduler.

Since: X3 (N-W-V0: N-world slot vectors + `*-n` entry points)

defstruct

BoundXSystem

(defstruct BoundXSystem [])

an XSystem with world identities + boxed handles

Since: X3

defn

make-bound-xsystem

(make-bound-xsystem)

low-level constructor.

Since: X3

defn

bind-xsystem

(bind-xsystem)

resolve an XSystem against concrete worlds. `w0-id`

Since: X3

defn

xsystem-conflicts?

(xsystem-conflicts? [a : BoundXSystem b : BoundXSystem] :)

true if two BoundXSystems cannot run

Since: X3

defstruct

BoundXSystemN

(defstruct BoundXSystemN [])

an N-world system with world identities + boxed

defn

make-bound-xsystem-n

(make-bound-xsystem-n)

low-level N-world constructor.

Since: N-W-V0

defmacro

bind-xsystem-n

(bind-xsystem-n [sys & pairs])

resolve an XSystemN against concrete worlds.

defopaque

XStage

(XStage)

heap container of scheduled systems, grouped into conflict-

Since: X3

defn

xstage-new

(xstage-new :)

allocate an empty XStage.

Since: X3

defn

xstage-len

(xstage-len [s : XStage] :)

count of systems added.

Since: X3

defn

xstage-add!

(xstage-add! [s : XStage sys : BoundXSystem] :)

shared C snippet (inlined as a comment for

defn

xstage-add-n!

(xstage-add-n! [s : XStage sys : BoundXSystemN] :)

append an N-world BoundXSystemN (ABI 1). The id /

defn

xstage-n-waves

(xstage-n-waves [s : XStage] :)

wave count, recomputing if stale.

Since: X3

defn

xstage-has-cycle?

(xstage-has-cycle? [s : XStage] :)

static well-formedness check. Builds the

Since: X3 (N-W-V0: ragged)

defn

xstage-run!

(xstage-run! [s : XStage] :)

run every system, each against its bound worlds.

Since: X3

defn

xstage-free!

(xstage-free! [s : XStage] :)

release the XStage's backing arrays, including each

Since: X3 (N-W-V0: free ragged slot vectors)

Internal definitions
xstage--bind-fills-- emit the per-slot `(xsm-set! __ids i WORLD-ID)`
xstage-task-- pthread worker. Reads {fn, wps, abi} and calls the
__xstage-recompute-waves-- greedy first-fit grouping under the
__xstage-run-wave-raw-- dispatch the systems in `wave-idx`
__xstage-dirty?-- internal staleness check.