Runtime API summary
A compact reference for the runtime-facing API surface.
TDSE Runtime has one product lifecycle and one execution-selection model. Create a model with all device and resource choices, run the ordinary step loop, and release or destroy the model. Private diagnostic routes and execution strategies are not part of the customer integration contract.
Minimal lifecycle
tdse_model_t *model = NULL;
tdse_model_create_diagnostics_t diagnostics =
tdse_model_create_diagnostics_init();
tdse_status_t status = tdse_model_create(
pack_data, pack_size, NULL, &diagnostics, &model);
Passing NULL options selects CPU, FP64, host-resident dynamic data, and the
host's current OpenBLAS configuration.
Configured lifecycle
tdse_model_create_options_t options = tdse_model_create_options_init();
options.device = TDSE_DEVICE_CPU;
options.precision = TDSE_PRECISION_FP64;
options.cpu_threads = provider_threads;
tdse_status_t status = tdse_model_create(
pack_data, pack_size, &options, &diagnostics, &model);
The same structure selects GPU or FPGA execution, host- or device-resident dynamic data, a scalar accelerator ordinal or ordered GPU set, caller-owned device queue, CPU IDs, CPU memory placement, and model memory limit. Device ID lists are copied during creation. These properties are immutable after creation.
Product API map
| Job | API |
|---|---|
| Create with defaults or explicit resources | tdse_model_create(...) |
| Inspect selected and observed resources | tdse_model_get_execution_info(...) |
| Inspect static model shape | tdse_model_info(...) |
| Inspect live model state | tdse_model_state_info(...) |
| Prepare/end a resident execution interval | tdse_model_execution_prepare(...), tdse_model_execution_end(...) |
| Begin a trial step | tdse_step_begin(...) |
| Read instantaneous operator | tdse_step_op(...) |
| Read delayed history | tdse_step_hr(...) |
| Read independent response | tdse_step_ir(...) |
| Commit accepted primary values | tdse_step_commit(...) |
| Read direct response | tdse_step_dr(...) |
| Clear committed state for intentional reuse | tdse_model_reset(...) |
| Normal bounded shutdown | tdse_model_destroy(...) |
| Terminal cleanup/finalizer | tdse_model_release(...) |
| Decode status and pack failures | tdse_status_message(...), tdse_pack_error_token(...) |
For device-resident GPU execution, the dynamic history/primary boundary is
tdse_eval_history_device_typed(...),
tdse_eval_history_device_view_typed(...), and
tdse_commit_primary_device_typed(...).
C++ equivalents
| Job | C++ API |
|---|---|
| Default creation | tdse::Model::fromMemory(pack) |
| Configured creation | tdse::Model::fromMemory(pack, tdse::ModelOptions) |
| Execution snapshot | model.executionInfo() |
| Step loop | beginStep, stepOp, stepHr, stepIr, commit, stepDr |
| Shutdown | destroy, release |
Ownership rules
- One worker owns a live model handle at a time.
- Create options are copied except for documented borrowed context/queue handles.
- TDSE never changes process-wide OpenBLAS thread settings or host affinity.
- Explicit GPU or FPGA selection fails closed; it never falls back to CPU.
- Device, precision, residency, and CPU resources change only by recreating the model.
For details, see Runtime Lifecycle, Step Execution, Concurrency and Shutdown, and Execution Devices and Performance.
