Bend is a high-level parallel programming language and compiler designed to execute code across multi-core CPUs and GPUs automatically. By translating functional source code into a graph-based intermediate representation, it enables massive parallel execution without requiring manual management of threads, locks, or atomic operations.
The runtime operates as an interaction net engine, where computations are represented as networks of nodes that reduce through local rewriting rules. This model utilizes a work-stealing scheduler to distribute tasks across thousands of hardware threads, ensuring that computational workloads scale efficiently across heterogeneous processing units.
The system incorporates a global heap with reference counting and cycle collection to handle memory management, alongside a lazy evaluation strategy that defers computation until results are strictly required. These mechanisms allow developers to focus on high-level logic while the compiler handles the complexities of parallel distribution and resource utilization.