runtime · runtime ·

cpu

Require the CPU compute route with [cpu]. The current source developer example selects --backend cpu-oracle explicitly.

computecpugameplaygpuyeho

CPU and GPU data processing with explicit ownership and completion.

cpu

Status: experimental

CPU · [cpu]

Apply damage to a small batch of health values on the explicit CPU route. Each invocation owns one element.

cpu · compute · gameplay · executed

[cpu]
compute ApplyDamage(buffer of int health, int damage)
{
    int index = compute.index
    if index >= health.count { return }
    health[index] = health[index] - damage
}

buffer of int health
health.Add(100)
health.Add(80)
health.Add(60)
computeTask job = dispatch ApplyDamage(health, 10)
wait job
if job.failed { Console.Error(job.error.message) Process.Exit(1) }
for index from 0 < health.count { Console.Log(Text.From(health[index])) }
project.mech
manifestVersion = "2"
package = "api.example.tag__cpu"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"
Expected output
90
70
50
Notes and source

yeho/docs/runtime/execution-boundaries.md; docs/runtime/metal-compute-v1.md