Authoritative simulation
Keep lockstep, solver, or world-state transitions identical across successful supported targets.
C++20 runtime and compute SDK
Express a bounded integer or fixed-point state transition once. Every successful supported target returns the same accepted bytes. An unavailable target returns its typed failure—never a hidden fallback.
1.0.4 Alpha Darwin ARM64 binary C++20 MIT
using Target = rund::compute::Target;
auto execute = [&](Target target) {
return rund::compute::on(target, input)
.map("step", [](auto x) { return x * 2 + 1; })
.collect();
};
auto cpu = execute(Target::cpu());
auto metal = execute(Target::metal());
auto vulkan = execute(Target::vulkan());
same bytes: cpu = metal = vulkan [3, 5, 7, 9]
The complete example handles each Result before comparing bytes.
01 / Where it earns its place
Use runD when backend differences are correctness defects—not merely performance noise.
Use runD when
Keep lockstep, solver, or world-state transitions identical across successful supported targets.
Make numeric law, ordering, graph identity, bounds, and canonical input part of the reproducible contract.
Keep one public Flow and select the physical target explicitly when the workload or host changes.
02 / The SDK path
collect(). Add machinery only when work repeats.One package covers the first result, reusable device work, and the runtime services around it.
Choose the smallest compute shape
Flow + collect()Programresident()PipelineBatchRuntime beside compute
Own lifecycle, scheduler resources, bounded work, and Compute submission together.
Admit external input through explicit ownership and bounded byte-level operations.
Capture canonical evidence and inspect bounded findings without changing the result.
03 / Measured on an M4 Pro
These checked observations answer two integration questions. They are not a portable CPU-versus-GPU ranking.
When resident work is compute-heavy
M4 Pro · N = 262,144 · median warm Job::run()
Use this to decide whether repeated resident execution deserves an accelerator measurement for your graph.
When submissions dominate
M4 Pro · 64 jobs × 64 elements · serial API wall path → one Batch
Use this to decide whether independent prepared jobs should share one submission boundary. The ratio is not a pure kernel-speed claim.
Warm figures exclude Resident creation and initial upload. Vulkan here runs through MoltenVK on Apple hardware. A different graph, device, driver, or data shape requires a new measurement.
04 / 1.0.4 Alpha
The current consumer release is intentionally narrow. Check the host boundary before integration.
CPU · native Metal · Vulkan through MoltenVK
Validated source candidate; no consumer release backend matrix is claimed.
No binary or execution path is claimed for 1.0.4.
The archive does not bundle MoltenVK. The verifier requires the exact admitted dependency tuple, so check the platform contract before installing.