API Reference
GemPBA's public surface is intentionally small.
Not writing C++?
This section documents the C++ API, but the same runtime is also a Maven dependency: the Java section covers the io.gempba surface, installation, and a full quick start. The two APIs mirror each other (create_load_balancer becomes createLoadBalancer, and so on), so this reference doubles as the conceptual map for Java readers.
Facade and concrete types
| Purpose | |
|---|---|
gempba |
The only header you need — facade, factory functions, global accessors |
node_manager |
Control panel: configure goal, submit work, wait, collect results |
node |
Concrete final class — user-facing handle to a branch in the recursion tree |
Interfaces
Pluggable contracts. Implement one to replace a built-in component.
| Purpose | |
|---|---|
node_core |
Abstract node — owns an instance, tracks tree position, manages lifecycle |
node_traits |
Full interface contract every node must satisfy |
load_balancer |
Thread-level work distribution within a process |
scheduler |
Process-level coordination — transport-agnostic IPC contract |
serial_runnable |
Type erasure for functions crossing process boundaries |
stats |
Runtime metrics collection |
stats_visitor |
Format-agnostic readout of collected metrics |
Implementations
Built-in concrete implementations of the above interfaces.
| Interface | Notes | |
|---|---|---|
| Quasi-Horizontal | load_balancer |
Recommended thread scheduler |
| Work-Stealing | load_balancer |
Benchmarking baseline |
| MPI Semi-Centralized | scheduler |
Recommended process scheduler |
| MPI Centralized | scheduler |
Benchmarking baseline |
| Stats | stats |
Default stats for MPI schedulers |
| Stats Visitors | stats_visitor |
Built-in metric formatters |
Telemetry
The runtime carries a built-in telemetry subsystem under include/gempba/telemetry/ (telemetry_hub, frame and topology structs, transports). It has its own documentation section rather than per-header reference pages: see Telemetry for the concepts, Configuration for the runtime API (disable/enable, configure_port, cadence control), and Data model for the frame contract.
C ABI
<gempba/cabi/gempba.h> exposes the full runtime as a stable extern "C" surface: opaque handles, status codes, and callback registration. It exists so non-C++ front-ends can drive GemPBA; the Java binding is its first consumer. For a code-level walkthrough, the GemPBA DeepWiki covers it in depth.