C · Errors

Errors

#include <uform/types.h> 4.0.0-rc.1 · 3ee5e534

Statuses are numbered as USearch numbers them, so a failure keeps its identity across the two libraries:

  • uform_status_out_of_memory_k: host, pinned or device memory ran out, or the scratch ceiling is too low.
  • uform_status_shape_mismatch_k and uform_status_unsupported_layout_k: counts, shapes or strides the model cannot read.
  • uform_status_malformed_k and uform_status_io_k: bytes that do not decode, or a file that does not open, read or write.
  • uform_status_device_k: the driver refused, a device faulted, or an executor and a model or arena disagree on residency.
  • uform_status_unknown_kind_k: a scalar, modality or name this build does not know.
  • uform_status_unsupported_k: a verb, modality or class this model or build does not serve.
  • uform_status_invalid_argument_k and uform_status_config_mismatch_k: an argument breaking the verb’s contract, or a request contradicting a frozen configuration.
  • uform_status_contended_k and uform_status_cancelled_k: a call refused rather than waited for, or stopped by its progress handler.
  • uform_status_internal_k: a defect, reported rather than hung on.

uform_status_name spells a status as lowercase words joined by dashes and uform_status_from_name reads it back, as the other closed sets’ _name and _from_name pairs do.

API

Types

uform_status_tWhat went wrong, numbered as USearch numbers it, so one failure carries one identity across the two libraries and every binding that validates before calling them.
types.h:185 ↗
enum uform_status_t

Values USearch spends on index states UForm has no counterpart for - a read-only handle, an exhausted ID space, an uninitialized reservation - stay unused here rather than renumbered.

Statuses fall into five categories. Resources: uform_status_out_of_memory_k, uform_status_io_k and uform_status_device_k. Input: uform_status_shape_mismatch_k, uform_status_unsupported_layout_k, uform_status_unknown_kind_k, uform_status_malformed_k and uform_status_invalid_argument_k. State: uform_status_config_mismatch_k, uform_status_contended_k and uform_status_unsupported_k. Interruptions: uform_status_cancelled_k and uform_status_deferred_k. Defects: uform_status_internal_k. Any verb that allocates, binds a device or touches a file may also return a Resources status; any verb taking a progress callback may return uform_status_cancelled_k. A verb's own block lists only what its contract adds.

Values

uform_status_success_k0The call completed; message carries nothing.
uform_status_deferred_k1The call was submitted deferred and is not final yet; the one non-final status.
uform_status_out_of_memory_k2Device, pinned, or host memory could not be allocated, or the executor's scratch ceiling is too low.
uform_status_shape_mismatch_k3Item counts, a pixel shape, or a batch envelope disagree with the call or the model.
uform_status_unsupported_layout_k4A stride or packing the model cannot read.
uform_status_unknown_kind_k5A scalar, modality, or name this build does not know.
uform_status_io_k7A checkpoint file could not be opened, read, or written.
uform_status_device_k8The driver refused or the device faulted; after a fault the executor refuses every later call.
uform_status_malformed_k9Supplied bytes could not be decoded: a checkpoint, an image, a clip, or a recording.
uform_status_internal_k10The library reported neither success nor a failure - a contract violation, so it names a defect.
uform_status_config_mismatch_k13The request contradicts a frozen configuration, like resuming a checkpoint of another geometry.
uform_status_contended_k14The call was refused rather than waited for, like a submission to a full deferred table, or a blocking call from inside a callback of the executor it would wait on.
uform_status_cancelled_k15A progress handler asked the call to stop; it unwound and published nothing.
uform_status_unsupported_k16The verb is declared for every residency or model, but this one does not implement it, like a modality the model was not trained on; no retry or smaller request can help.
uform_status_invalid_argument_k17An argument breaks the verb's contract - a required pointer left NULL, inputs inside the arena the call rewinds, a name no table spells.

Spellings

char const * uform_status_name(uform_status_t status);
uform_status_t uform_status_from_name(uform_bytes_view_t name);