Realm
API

Core, data, and cryptography

Core runtime, numerical operations, datasets, and cryptography.

Generated from rustdocNative Rust surface206 functions251 types82 enums470 constants & variables
This inventory is generated from public rustdoc declarations. Modules, structs, enums, traits, aliases, signatures, source comments, and source links follow the native Rust API.

Examples

oa

Functions

Translate a NumericMode into the equivalent env-knob state. Called once at engine init. User-set env vars always win (EnvFlag::set_if_unset checks before writing). ModeEnv vars touched Fastnone StableOA_FORCE_PRECISION=FP32, OA_DISABLE_COOPMAT=1 Deterministicabove + OA_DISABLE_PERSISTENT_LOOP=1 Port provenance: oa::applyNumericMode in oa/core/envFlag.h.

Prepend VIEWPORT_TITLE to a custom window title. Empty title → returns "OaViewport". Title already starts with "OaViewport" → returned unchanged (no double-prepend). Otherwise → "OaViewport" + title. Port provenance: oa::brandViewport in oa/core/constant.h.

Types

10 members
10 members
3 members

Keras-style hook interface for OA iterator sessions. Attach one or more callbacks to a session via its add_callback method. All hooks receive a &dyn IteratorContext so callbacks stay decoupled from the concrete session type. Mapping from C++C++Rust onBegin(Iterator&)on_begin(&mut self, ctx) onStep(Iterator&)on_step(&mut self, ctx) onEnd(Iterator&)on_end(&mut self, ctx) C++ used virtual inheritance; Rust uses dynamic dispatch through Box<dyn Callback>. The C++ move-constructor convention maps to Rust’s normal ownership — place Box<dyn Callback> values in a Vec rather than raw pointers.

Source
8 members
4 members
20 members

Command-line configuration with YAML + argv precedence. Type parameter C is any config struct that implements Default. Defaults are the base layer; a YAML file loaded via -c/--config overrides them; explicit argv flags override those. YAML support YAML loading is the caller’s responsibility. Pass a loader closure to Cli::parse_args_with_yaml to apply YAML fields before argv parsing when a -c/--config path is present.

Source
34 members

Four-component RGBA color used by UI, plotting, overlays, and ordinary normalized render colors.

f32
f32
f32
f32

Pack to 0xRRGGBBAA, clamping each component and rounding to nearest.

static

Pack to 0xRRGGBBAA, clamping each component and rounding to nearest.

method

Pack to 0xRRGGBBAA, clamping each component and rounding to nearest.

method

Pack to 0xRRGGBBAA, clamping each component and rounding to nearest.

method

Pack to 0xRRGGBBAA, clamping each component and rounding to nearest.

static

Pack to 0xRRGGBBAA, clamping each component and rounding to nearest.

static

Pack to 0xRRGGBBAA, clamping each component and rounding to nearest.

static

Pack to 0xRRGGBBAA, clamping each component and rounding to nearest.

static

Pack to 0xRRGGBBAA, clamping each component and rounding to nearest.

static

Pack to 0xRRGGBBAA, clamping each component and rounding to nearest.

static

Pack to 0xRRGGBBAA, clamping each component and rounding to nearest.

static

Pack to 0xRRGGBBAA, clamping each component and rounding to nearest.

static

Pack to 0xRRGGBBAA, clamping each component and rounding to nearest.

static

Pack to 0xRRGGBBAA, clamping each component and rounding to nearest.

static

Pack to 0xRRGGBBAA, clamping each component and rounding to nearest.

static
Source
7 members
4 members
28 members

Error returned by fallible OA operations. Backend and dependency errors are retained as sources without exposing their concrete types through OA’s public API.

Source
22 members

Stateless host-filesystem operations. All methods are free functions on &Path. There is no instance state. Matches the surface of oa::Filesystem in C++ and its Python bindings so that cross-language code reads identically: ⓘFilesystem::create_directories(output.parent().unwrap())?; let text = Filesystem::read_text(&config_path)?;

Source
11 members

Platform-neutral input event. Donor: oa/ui/event.h UiEvent.

Source
0 members

Modifier key bitmask (matches donor UiModifier* constants).

Source
3 members
3 members

Object-safe view of an iterator’s current state, passed to every Callback hook. The concrete iterator (e.g. TrainingLoop) implements this privately; the callback only needs the interface.

Source
27 members

Locked skeletal-joint transform value. Donor: oa::Joint. Setters that the donor guards with contract aborts return Result here instead.

Source
4 members

One sparse animation-curve sample. Tangents are expressed per second and default to the value type’s zero. For quaternion curves the zero tangent is the all-zero quaternion, while value defaults to identity. Donor: oa::Keyframe<T>.

Source
4 members
11 members
8 members
78 members

Device-visible numeric storage with explicit shape and dtype semantics. Arithmetic operators delegate to crate::matrix and return Result<Matrix>: use let sum = (&left + &right)?;. They preserve validation, allocation, and recording failures without panicking. Multiplication is elementwise; use crate::matrix::mat_mul_nt for matrix multiplication.

Source
6 members
45 members

Logical value effects of an operation.

Source
24 members

Stable semantic contract for one operation before backend lowering. Generated operation registries own these descriptors. The builder-style const methods are public so generated code remains ordinary inspectable Rust rather than a private binary table.

Source
40 members

An owned OA path value. Wraps std::path::PathBuf and adds the canonical OA named-location resolvers as associated functions. All std::fs calls and crate::Filesystem methods accept &oa::Path directly through Deref. ⓘlet wav = oa::Path::asset_rel("audio/oaNarration.wav"); let out = oa::Path::var_rel("example/audio/out.wav"); let ckpt = oa::Path::temp().join("model.oam");

Source
14 members
0 members

Result returned by fallible OA operations.

Source
2 members

RAII scoped timer. Borrows a f64 and writes elapsed seconds on drop. ⓘlet mut elapsed = 0.0_f64; { let _t = oa::ScopedTimer::new(&mut elapsed); expensive_work(); } println!("took {elapsed:.3}s");

Source
7 members
10 members
18 members

Nanosecond-precision monotonic timestamp. Internally stores nanoseconds elapsed since an arbitrary monotonic origin. Two Timestamp values from the same process can be subtracted; the result is meaningful as a Duration. Do not compare values across processes.

Source
25 members

Semantic local spatial transform value. Stores translation + unit-quaternion rotation + per-axis scale + optional dimensionless row-basis shear (XY, XZ, YZ). All constructed values are finite; operations that would produce a non-finite result leave the value unchanged and return an error. Donor: oa::Transform.

Source
10 members

Enums

Read/write access qualifier for a buffer binding. Port provenance: oa::BufferAccess in oa/core/bufferAccess.h.

Read · Write · ReadWrite

Scalar data representation of an OA value.

U8 · F32 · I32 · U32

Stable category for an OA failure.

InvalidArgument · NotReady · BackendUnavailable · BackendFailure · UnsupportedBackendVersion · NoSuitableDevice · MissingCapability · ResourceExhausted · FailedPrecondition · OutOfRange · NotFound · AlreadyExists · Aborted · CallbackFailure · CheckpointCorrupt · DataLoss · Internal · Io · Cancelled · PermissionDenied · Unimplemented · Unavailable · Unauthenticated · ShapeMismatch · DtypeMismatch

Discriminant for InputEvent. Donor: UiEventType.

None · MouseMove · MouseDown · MouseUp · MouseScroll · KeyDown · KeyUp · KeyChar · WindowResize · WindowClose · WindowFocus · WindowBlur · Pinch · TextEditing · MouseEnter · MouseLeave · GamepadButtonDown · GamepadButtonUp · GamepadAxisMotion

Platform-neutral keyboard key identifier (SDL3 scancode values).

Unknown = 0 · A = 4 · B = 5 · C = 6 · D = 7 · E = 8 · F = 9 · G = 10 · H = 11 · I = 12 · J = 13 · K = 14 · L = 15 · M = 16 · N = 17 · O = 18 · P = 19 · Q = 20 · R = 21 · S = 22 · T = 23 · U = 24 · V = 25 · W = 26 · X = 27 · Y = 28 · Z = 29 · Num1 = 30 · Num2 = 31 · Num3 = 32 · Num4 = 33 · Num5 = 34 · Num6 = 35 · Num7 = 36 · Num8 = 37 · Num9 = 38 · Num0 = 39 · Return = 40 · Escape = 41 · Backspace = 42 · Tab = 43 · Space = 44 · Minus = 45 · Equals = 46 · Comma = 54 · Period = 55 · Slash = 56 · F1 = 58 · F2 = 59 · F3 = 60 · F4 = 61 · F5 = 62 · F6 = 63 · F7 = 64 · F8 = 65 · F9 = 66 · F10 = 67 · F11 = 68 · F12 = 69 · Home = 74 · Delete = 76 · End = 77 · Right = 79 · Left = 80 · Down = 81 · Up = 82 · KpEnter = 88 · Kp1 = 89 · Kp2 = 90 · Kp3 = 91 · Kp4 = 92 · Kp5 = 93 · Kp6 = 94 · Kp7 = 95 · Kp8 = 96 · Kp9 = 97 · Kp0 = 98

Shared donor timing policy for widget and viewport transitions.

Normal · Fast · Fastest · Instant

Process-wide numerical execution policy. Core owns the vocabulary and its environment mapping; the runtime engine consumes it through EngineConfig. ModeEffect Fastvendor math, non-deterministic reductions StableFP32 accumulators, CoopMat disabled Deterministicfixed reduction order, no race-dependent atomics Port provenance: oa::NumericMode in oa/core/envFlag.h.

Fast = 0 · Stable = 1 · Deterministic = 2

One ordered non-value input that affects operation meaning.

Boolean · SignedInteger · UnsignedInteger · Float · String · Shape · Enum

Stable type tag for a non-value operation attribute.

Boolean · SignedInteger · UnsignedInteger · Float · String · Shape · Enum

Semantic control-flow class of an operation.

StraightLine · Conditional · Loop

Uniform dtype relationship declared by an operation schema.

MatchInput · PromoteFloat · Explicit

Reverse-differentiation behavior declared by an operation schema.

None · Reverse

Backend-neutral lowering family requested by an operation schema.

Dispatch · Gemm

Uniform shape relationship declared by an operation schema.

MatchInput · Broadcast · MatMulNt · Explicit

Semantic kind of one operation value.

Matrix · Image · Audio · VideoFrame · QuantMatrix · Texture

Phase of a multi-touch pinch gesture.

None · Begin · Update · End

Classified scroll gesture — maps to donor UiScrollGesture.

None · MouseWheel · TouchpadPan · PinchScroll

Severity levels for validation messages. Port provenance: oa::ValidationSeverity.

Verbose = 0 · Info = 1 · Warning = 2 · Error = 3 · Fatal = 4

Constants & Variables

pub const COMPACT_BANNER: &str = r" ╔═══════════════════════════════════════════════════════════════════════════════╗ ║ oa::Library ║ ║ The Library. Every Vendor. Vulkan Native. ║ ╚═══════════════════════════════════════════════════════════════════════════════╝ ";Source
pub const INPUT_MOD_ALT: InputModifiers = _; // 4u32Source
pub const INPUT_MOD_CTRL: InputModifiers = _; // 2u32Source
pub const INPUT_MOD_NONE: InputModifiers = 0;Source
pub const INPUT_MOD_SHIFT: InputModifiers = _; // 1u32Source
pub const INPUT_MOD_SUPER: InputModifiers = _; // 8u32Source
pub const REALM_BANNER: &str = r" ██████╗ ███████╗ █████╗ ██╗ ███╗ ███╗ ██╔══██╗██╔════╝██╔══██╗██║ ████╗ ████║ ██████╔╝█████╗ ███████║██║ ██╔████╔██║ ██╔══██╗██╔══╝ ██╔══██║██║ ██║╚██╔╝██║ ██║ ██║███████╗██║ ██║███████╗██║ ╚═╝ ██║ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ";Source
pub const VIEWPORT_TITLE: &str = "OaViewport";Source

Functions

Sample a curve uniformly into frame_count values beginning at start_time. Errors Returns an error for non-finite or non-positive frames_per_second, a zero frame_count, a sample time beyond the representable range, or a sampling failure. Donor: oa::FnAnim::bake.

Create a validated AnimClip from frame-major uniform samples. samples must hold a whole number of joint_count frames. Errors Returns an error for a zero joint count, non-finite or non-positive frames_per_second, empty or partial-frame samples, a non-finite transform, or a frame count beyond the supported range. Donor: oa::FnAnim::createClip.

Create a validated AnimCurve from strictly increasing keyframes. Quaternion curves normalize every keyframe value on construction. Errors Returns an error for empty or non-increasing keyframe times, non-finite or invalid values/tangents, an excessive count, or a time span that cannot be represented. Donor: oa::FnAnim::createCurve.

Create a validated SkelPose from local joint transforms. Errors Returns an error when local_transforms is empty, contains a non-finite transform, or exceeds the supported joint count. Donor: oa::FnAnim::createPose.

Extract the pose stored at frame. Errors Returns an error when the clip is invalid or frame is out of range. Donor: oa::FnAnim::getFrame.

Sample a clip at time_seconds, interpolating translation (lerp), rotation (slerp), scale, and shear per joint. Errors Returns an error when the clip is invalid or time_seconds is not finite. Donor: oa::FnAnim::sample(AnimClip).

Sample a curve at time under wrap_mode. Errors Returns an error when interpolation produces a non-finite or non-normalizable value. Donor: oa::FnAnim::sample(AnimCurve).

Re-validate an AnimClip. Errors Returns an error under the same contract as create_clip. Donor: oa::FnAnim::validate(AnimClip).

Re-validate an AnimCurve and every stored keyframe. Errors Returns an error under the same contract as create_curve. Donor: oa::FnAnim::validate(AnimCurve).

Re-validate a SkelPose. Errors Returns an error under the same contract as create_pose. Donor: oa::FnAnim::validate(SkelPose).

Types

10 members
10 members
10 members
27 members

Locked skeletal-joint transform value. Donor: oa::Joint. Setters that the donor guards with contract aborts return Result here instead.

Source
4 members
4 members

Optional per-axis rotation limits in degrees. An axis is clamped only when the matching enabled flag is set; enabling both bounds on an axis requires minimum <= maximum on it. Limits are disabled by default even though JointDegreesOfFreedom::default is all-enabled. Donor: oa::JointRotationLimits.

Source
4 members

One sparse animation-curve sample. Tangents are expressed per second and default to the value type’s zero. For quaternion curves the zero tangent is the all-zero quaternion, while value defaults to identity. Donor: oa::Keyframe<T>.

Source
7 members

Enums

Interpolation mode applied between two adjacent keyframes. Donor: oa::AnimInterpolation. The Rust enum cannot hold the donor’s castable invalid values, so no separate validity predicate exists.

Step · Linear · CubicSpline

Wrap behavior applied when sampling outside the clip’s frame range. Donor: oa::AnimWrapMode. The Rust enum cannot hold invalid values.

Clamp · Loop

Types

3 members

A compiled extension compute kernel on one engine’s device. Compile cost is paid once at construction; identical SPIR-V on the same device reuses the cached pipeline. The kernel may be dispatched any number of times via Engine::dispatch_kernel. It is not part of the semantic graph or fusion system: dispatches record as physical nodes with the caller-declared binding accesses.

Source

Enums

One storage binding in an extension-kernel dispatch. The declared access drives barrier planning: reads may overlap, writes serialize against the storage’s other recorded work. Declaring Write on a binding the shader also reads is a contract violation; use KernelBinding::ReadWrite.

Read(&'a Matrix) · Write(&'a Matrix) · ReadWrite(&'a Matrix)

One four-byte push-constant word appended after the binding indices.

U32(u32) · F32(f32)

Functions

Translate a NumericMode into the equivalent env-knob state. Called once at engine init. User-set env vars always win (EnvFlag::set_if_unset checks before writing). ModeEnv vars touched Fastnone StableOA_FORCE_PRECISION=FP32, OA_DISABLE_COOPMAT=1 Deterministicabove + OA_DISABLE_PERSISTENT_LOOP=1 Port provenance: oa::applyNumericMode in oa/core/envFlag.h.

Prepend VIEWPORT_TITLE to a custom window title. Empty title → returns "OaViewport". Title already starts with "OaViewport" → returned unchanged (no double-prepend). Otherwise → "OaViewport" + title. Port provenance: oa::brandViewport in oa/core/constant.h.

Recover a unit quaternion from a 6-component rotation representation. Donor: oa::FnTransform::quaternionFromSixD.

Pack a unit quaternion into a 6-component continuous rotation representation. The first two columns of the rotation matrix (rows in row-vector convention) are stored as [r0x, r0y, r0z, r1x, r1y, r1z]. The third column is recovered by the cross product at decode time. Donor: oa::FnTransform::quaternionToSixD.

Types

3 members

Keras-style hook interface for OA iterator sessions. Attach one or more callbacks to a session via its add_callback method. All hooks receive a &dyn IteratorContext so callbacks stay decoupled from the concrete session type. Mapping from C++C++Rust onBegin(Iterator&)on_begin(&mut self, ctx) onStep(Iterator&)on_step(&mut self, ctx) onEnd(Iterator&)on_end(&mut self, ctx) C++ used virtual inheritance; Rust uses dynamic dispatch through Box<dyn Callback>. The C++ move-constructor convention maps to Rust’s normal ownership — place Box<dyn Callback> values in a Vec rather than raw pointers.

Source
8 members
4 members
20 members

Command-line configuration with YAML + argv precedence. Type parameter C is any config struct that implements Default. Defaults are the base layer; a YAML file loaded via -c/--config overrides them; explicit argv flags override those. YAML support YAML loading is the caller’s responsibility. Pass a loader closure to Cli::parse_args_with_yaml to apply YAML fields before argv parsing when a -c/--config path is present.

Source
34 members

Four-component RGBA color used by UI, plotting, overlays, and ordinary normalized render colors.

f32
f32
f32
f32

Pack to 0xRRGGBBAA, clamping each component and rounding to nearest.

static

Pack to 0xRRGGBBAA, clamping each component and rounding to nearest.

method

Pack to 0xRRGGBBAA, clamping each component and rounding to nearest.

method

Pack to 0xRRGGBBAA, clamping each component and rounding to nearest.

method

Pack to 0xRRGGBBAA, clamping each component and rounding to nearest.

static

Pack to 0xRRGGBBAA, clamping each component and rounding to nearest.

static

Pack to 0xRRGGBBAA, clamping each component and rounding to nearest.

static

Pack to 0xRRGGBBAA, clamping each component and rounding to nearest.

static

Pack to 0xRRGGBBAA, clamping each component and rounding to nearest.

static

Pack to 0xRRGGBBAA, clamping each component and rounding to nearest.

static

Pack to 0xRRGGBBAA, clamping each component and rounding to nearest.

static

Pack to 0xRRGGBBAA, clamping each component and rounding to nearest.

static

Pack to 0xRRGGBBAA, clamping each component and rounding to nearest.

static

Pack to 0xRRGGBBAA, clamping each component and rounding to nearest.

static

Pack to 0xRRGGBBAA, clamping each component and rounding to nearest.

static
Source
7 members
20 members

Signed nanosecond-precision duration. Stores i64 nanoseconds. Checked constructors return None on overflow instead of the donor’s contract abort.

Source
1 members

Rust host type that has one exact admitted dense DType representation. This trait is sealed so OA can uphold the no-padding and bit-validity requirements used by checked upload and readback.

Source
4 members
28 members

Error returned by fallible OA operations. Backend and dependency errors are retained as sources without exposing their concrete types through OA’s public API.

Source
22 members

Stateless host-filesystem operations. All methods are free functions on &Path. There is no instance state. Matches the surface of oa::Filesystem in C++ and its Python bindings so that cross-language code reads identically: ⓘFilesystem::create_directories(output.parent().unwrap())?; let text = Filesystem::read_text(&config_path)?;

Source
3 members

Object-safe view of an iterator’s current state, passed to every Callback hook. The concrete iterator (e.g. TrainingLoop) implements this privately; the callback only needs the interface.

Source
4 members
11 members
8 members
78 members

Device-visible numeric storage with explicit shape and dtype semantics. Arithmetic operators delegate to crate::matrix and return Result<Matrix>: use let sum = (&left + &right)?;. They preserve validation, allocation, and recording failures without panicking. Multiplication is elementwise; use crate::matrix::mat_mul_nt for matrix multiplication.

Source
6 members
45 members

Logical value effects of an operation.

Source
24 members

Stable semantic contract for one operation before backend lowering. Generated operation registries own these descriptors. The builder-style const methods are public so generated code remains ordinary inspectable Rust rather than a private binary table.

Source
40 members

An owned OA path value. Wraps std::path::PathBuf and adds the canonical OA named-location resolvers as associated functions. All std::fs calls and crate::Filesystem methods accept &oa::Path directly through Deref. ⓘlet wav = oa::Path::asset_rel("audio/oaNarration.wav"); let out = oa::Path::var_rel("example/audio/out.wav"); let ckpt = oa::Path::temp().join("model.oam");

Source
14 members
0 members

Result returned by fallible OA operations.

Source
2 members

RAII scoped timer. Borrows a f64 and writes elapsed seconds on drop. ⓘlet mut elapsed = 0.0_f64; { let _t = oa::ScopedTimer::new(&mut elapsed); expensive_work(); } println!("took {elapsed:.3}s");

Source
10 members
18 members

Nanosecond-precision monotonic timestamp. Internally stores nanoseconds elapsed since an arbitrary monotonic origin. Two Timestamp values from the same process can be subtracted; the result is meaningful as a Duration. Do not compare values across processes.

Source
25 members

Semantic local spatial transform value. Stores translation + unit-quaternion rotation + per-axis scale + optional dimensionless row-basis shear (XY, XZ, YZ). All constructed values are finite; operations that would produce a non-finite result leave the value unchanged and return an error. Donor: oa::Transform.

Source
10 members

Enums

Read/write access qualifier for a buffer binding. Port provenance: oa::BufferAccess in oa/core/bufferAccess.h.

Read · Write · ReadWrite

Scalar data representation of an OA value.

U8 · F32 · I32 · U32

Stable category for an OA failure.

InvalidArgument · NotReady · BackendUnavailable · BackendFailure · UnsupportedBackendVersion · NoSuitableDevice · MissingCapability · ResourceExhausted · FailedPrecondition · OutOfRange · NotFound · AlreadyExists · Aborted · CallbackFailure · CheckpointCorrupt · DataLoss · Internal · Io · Cancelled · PermissionDenied · Unimplemented · Unavailable · Unauthenticated · ShapeMismatch · DtypeMismatch

Process-wide numerical execution policy. Core owns the vocabulary and its environment mapping; the runtime engine consumes it through EngineConfig. ModeEffect Fastvendor math, non-deterministic reductions StableFP32 accumulators, CoopMat disabled Deterministicfixed reduction order, no race-dependent atomics Port provenance: oa::NumericMode in oa/core/envFlag.h.

Fast = 0 · Stable = 1 · Deterministic = 2

One ordered non-value input that affects operation meaning.

Boolean · SignedInteger · UnsignedInteger · Float · String · Shape · Enum

Stable type tag for a non-value operation attribute.

Boolean · SignedInteger · UnsignedInteger · Float · String · Shape · Enum

Semantic control-flow class of an operation.

StraightLine · Conditional · Loop

Uniform dtype relationship declared by an operation schema.

MatchInput · PromoteFloat · Explicit

Reverse-differentiation behavior declared by an operation schema.

None · Reverse

Backend-neutral lowering family requested by an operation schema.

Dispatch · Gemm

Uniform shape relationship declared by an operation schema.

MatchInput · Broadcast · MatMulNt · Explicit

Semantic kind of one operation value.

Matrix · Image · Audio · VideoFrame · QuantMatrix · Texture

Severity levels for validation messages. Port provenance: oa::ValidationSeverity.

Verbose = 0 · Info = 1 · Warning = 2 · Error = 3 · Fatal = 4

Constants & Variables

pub const COMPACT_BANNER: &str = r" ╔═══════════════════════════════════════════════════════════════════════════════╗ ║ oa::Library ║ ║ The Library. Every Vendor. Vulkan Native. ║ ╚═══════════════════════════════════════════════════════════════════════════════╝ ";Source
pub const REALM_BANNER: &str = r" ██████╗ ███████╗ █████╗ ██╗ ███╗ ███╗ ██╔══██╗██╔════╝██╔══██╗██║ ████╗ ████║ ██████╔╝█████╗ ███████║██║ ██╔████╔██║ ██╔══██╗██╔══╝ ██╔══██║██║ ██║╚██╔╝██║ ██║ ██║███████╗██║ ██║███████╗██║ ╚═╝ ██║ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ";Source
pub const VIEWPORT_TITLE: &str = "OaViewport";Source

Types

3 members

Keras-style hook interface for OA iterator sessions. Attach one or more callbacks to a session via its add_callback method. All hooks receive a &dyn IteratorContext so callbacks stay decoupled from the concrete session type. Mapping from C++C++Rust onBegin(Iterator&)on_begin(&mut self, ctx) onStep(Iterator&)on_step(&mut self, ctx) onEnd(Iterator&)on_end(&mut self, ctx) C++ used virtual inheritance; Rust uses dynamic dispatch through Box<dyn Callback>. The C++ move-constructor convention maps to Rust’s normal ownership — place Box<dyn Callback> values in a Vec rather than raw pointers.

Source
8 members
3 members

Object-safe view of an iterator’s current state, passed to every Callback hook. The concrete iterator (e.g. TrainingLoop) implements this privately; the callback only needs the interface.

Source

Types

20 members

Command-line configuration with YAML + argv precedence. Type parameter C is any config struct that implements Default. Defaults are the base layer; a YAML file loaded via -c/--config overrides them; explicit argv flags override those. YAML support YAML loading is the caller’s responsibility. Pass a loader closure to Cli::parse_args_with_yaml to apply YAML fields before argv parsing when a -c/--config path is present.

Source
4 members
17 members

Sealed helper for CLI value parsing.

Source

Types

Functions

Prepend VIEWPORT_TITLE to a custom window title. Empty title → returns "OaViewport". Title already starts with "OaViewport" → returned unchanged (no double-prepend). Otherwise → "OaViewport" + title. Port provenance: oa::brandViewport in oa/core/constant.h.

Constants & Variables

pub const COMPACT_BANNER: &str = r" ╔═══════════════════════════════════════════════════════════════════════════════╗ ║ oa::Library ║ ║ The Library. Every Vendor. Vulkan Native. ║ ╚═══════════════════════════════════════════════════════════════════════════════╝ ";Source
pub const REALM_BANNER: &str = r" ██████╗ ███████╗ █████╗ ██╗ ███╗ ███╗ ██╔══██╗██╔════╝██╔══██╗██║ ████╗ ████║ ██████╔╝█████╗ ███████║██║ ██╔████╔██║ ██╔══██╗██╔══╝ ██╔══██║██║ ██║╚██╔╝██║ ██║ ██║███████╗██║ ██║███████╗██║ ╚═╝ ██║ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ";Source

Functions

Translate a NumericMode into the equivalent env-knob state. Called once at engine init. User-set env vars always win (EnvFlag::set_if_unset checks before writing). ModeEnv vars touched Fastnone StableOA_FORCE_PRECISION=FP32, OA_DISABLE_COOPMAT=1 Deterministicabove + OA_DISABLE_PERSISTENT_LOOP=1 Port provenance: oa::applyNumericMode in oa/core/envFlag.h.

Types

Enums

Process-wide numerical execution policy. Core owns the vocabulary and its environment mapping; the runtime engine consumes it through EngineConfig. ModeEffect Fastvendor math, non-deterministic reductions StableFP32 accumulators, CoopMat disabled Deterministicfixed reduction order, no race-dependent atomics Port provenance: oa::NumericMode in oa/core/envFlag.h.

Fast = 0 · Stable = 1 · Deterministic = 2

Types

22 members

Stateless host-filesystem operations. All methods are free functions on &Path. There is no instance state. Matches the surface of oa::Filesystem in C++ and its Python bindings so that cross-language code reads identically: ⓘFilesystem::create_directories(output.parent().unwrap())?; let text = Filesystem::read_text(&config_path)?;

Source

Types

Types

Functions

Copy one complete byte slice into another non-overlapping slice. Small dynamic copies use fixed compiler-known blocks. Qualified medium copies use cached SIMD stores; bulk copies retain the platform implementation. Errors Returns an error when the slices have different lengths.

Copy one complete byte slice using an explicit one-way streaming policy. The destination must not be consumed by the CPU soon. On a qualified x86-64 target, medium-sized copies use non-temporal stores. Other sizes use cached stores, preferring the platform routine above the small-copy range. Errors Returns an error when the slices have different lengths.

Compare equal-length byte slices without content-dependent early exit. Different public lengths may return immediately. For equal lengths, every byte is visited before the result is produced. This is a bounded primitive, not a claim of system-wide constant-time behavior on every platform.

Erase every byte through observable stores. Unlike ordinary filling or zeroing, these writes are retained even when the compiler can prove the destination is not subsequently read. This does not erase copies held elsewhere or guarantee removal from caches or swap.

Constants & Variables

Constants & Variables

Constants & Variables

Constants & Variables

Constants & Variables

Constants & Variables

Constants & Variables

Constants & Variables

Constants & Variables

Constants & Variables

Constants & Variables

Types

40 members

An owned OA path value. Wraps std::path::PathBuf and adds the canonical OA named-location resolvers as associated functions. All std::fs calls and crate::Filesystem methods accept &oa::Path directly through Deref. ⓘlet wav = oa::Path::asset_rel("audio/oaNarration.wav"); let out = oa::Path::var_rel("example/audio/out.wav"); let ckpt = oa::Path::temp().join("model.oam");

Source

Types

Types

7 members
2 members

RAII scoped timer. Borrows a f64 and writes elapsed seconds on drop. ⓘlet mut elapsed = 0.0_f64; { let _t = oa::ScopedTimer::new(&mut elapsed); expensive_work(); } println!("took {elapsed:.3}s");

Source
10 members
18 members

Nanosecond-precision monotonic timestamp. Internally stores nanoseconds elapsed since an arbitrary monotonic origin. Two Timestamp values from the same process can be subtracted; the result is meaningful as a Duration. Do not compare values across processes.

Source

Functions

Recover a unit quaternion from a 6-component rotation representation. Donor: oa::FnTransform::quaternionFromSixD.

Pack a unit quaternion into a 6-component continuous rotation representation. The first two columns of the rotation matrix (rows in row-vector convention) are stored as [r0x, r0y, r0z, r1x, r1y, r1z]. The third column is recovered by the cross product at decode time. Donor: oa::FnTransform::quaternionToSixD.

Types

25 members

Semantic local spatial transform value. Stores translation + unit-quaternion rotation + per-axis scale + optional dimensionless row-basis shear (XY, XZ, YZ). All constructed values are finite; operations that would produce a non-finite result leave the value unchanged and return an error. Donor: oa::Transform.

Source

Types

Enums

Severity levels for validation messages. Port provenance: oa::ValidationSeverity.

Verbose = 0 · Info = 1 · Warning = 2 · Error = 3 · Fatal = 4

Functions

Clear per-frame deltas (scroll, motion delta, press/release edges).

Initialize the input backend. Idempotent. Prefers native pinch gestures and precise wheel deltas on Wayland; the touchpad stays pointer/wheel input rather than raw touch.

Last known pointer position, updated on motion, buttons, and wheel.

Return whether button went down since the last update. Remains valid until clear_for_next_frame.

Feed one raw platform event into the per-frame snapshot. Mouse motion/buttons/wheel fold into the pointer state; key down/up sets the scancode-indexed held bits. Press/release edges are derived by update. Donor: oa::input::processEvent.

Return whether button went up since the last update. Remains valid until clear_for_next_frame.

Fold queued events into held/rising/falling edges. Call once per frame after all process_event calls and before reading press/release.

Types

11 members

Platform-neutral input event. Donor: oa/ui/event.h UiEvent.

Source
0 members

Modifier key bitmask (matches donor UiModifier* constants).

Source
3 members
13 members
1 members

One named action: trigger, focus context, repeat policy, and callback. Donor: oa::KeyAction.

String
KeyBinding
InputContext
Option<Box<dyn FnMut()>>
Source
5 members
4 members
3 members
18 members

2-D viewport navigation session. Donor: oa::Navigation.

Source
3 members

Enums

Stable input-button identity for held/rising/falling queries. Donor: oa::input::Button.

None · MouseLeft · MouseMiddle · MouseRight · KeyUp · KeyDown · KeyLeft · KeyRight · KeySpace · KeyEscape · KeyEnter

Focus domain gating which actions a key event may reach. Global actions are always active; other contexts only fire while the matching focus is set through InputSystem::set_context. Donor: oa::InputContext.

Global · NodeCanvas · TextInput · Timeline

Discriminant for InputEvent. Donor: UiEventType.

None · MouseMove · MouseDown · MouseUp · MouseScroll · KeyDown · KeyUp · KeyChar · WindowResize · WindowClose · WindowFocus · WindowBlur · Pinch · TextEditing · MouseEnter · MouseLeave · GamepadButtonDown · GamepadButtonUp · GamepadAxisMotion

Platform-neutral keyboard key identifier (SDL3 scancode values).

Unknown = 0 · A = 4 · B = 5 · C = 6 · D = 7 · E = 8 · F = 9 · G = 10 · H = 11 · I = 12 · J = 13 · K = 14 · L = 15 · M = 16 · N = 17 · O = 18 · P = 19 · Q = 20 · R = 21 · S = 22 · T = 23 · U = 24 · V = 25 · W = 26 · X = 27 · Y = 28 · Z = 29 · Num1 = 30 · Num2 = 31 · Num3 = 32 · Num4 = 33 · Num5 = 34 · Num6 = 35 · Num7 = 36 · Num8 = 37 · Num9 = 38 · Num0 = 39 · Return = 40 · Escape = 41 · Backspace = 42 · Tab = 43 · Space = 44 · Minus = 45 · Equals = 46 · Comma = 54 · Period = 55 · Slash = 56 · F1 = 58 · F2 = 59 · F3 = 60 · F4 = 61 · F5 = 62 · F6 = 63 · F7 = 64 · F8 = 65 · F9 = 66 · F10 = 67 · F11 = 68 · F12 = 69 · Home = 74 · Delete = 76 · End = 77 · Right = 79 · Left = 80 · Down = 81 · Up = 82 · KpEnter = 88 · Kp1 = 89 · Kp2 = 90 · Kp3 = 91 · Kp4 = 92 · Kp5 = 93 · Kp6 = 94 · Kp7 = 95 · Kp8 = 96 · Kp9 = 97 · Kp0 = 98

Shared donor timing policy for widget and viewport transitions.

Normal · Fast · Fastest · Instant

Phase of a multi-touch pinch gesture.

None · Begin · Update · End

Classified scroll gesture — maps to donor UiScrollGesture.

None · MouseWheel · TouchpadPan · PinchScroll

Constants & Variables

pub const INPUT_MOD_ALT: InputModifiers = _; // 4u32Source
pub const INPUT_MOD_CTRL: InputModifiers = _; // 2u32Source
pub const INPUT_MOD_NONE: InputModifiers = 0;Source
pub const INPUT_MOD_SHIFT: InputModifiers = _; // 1u32Source
pub const INPUT_MOD_SUPER: InputModifiers = _; // 8u32Source

Types

18 members

2-D viewport navigation session. Donor: oa::Navigation.

Source
3 members

Functions

Convert one SDL3 event into a InputEvent. pixel_scale_x / pixel_scale_y convert logical SDL coordinates to physical pixels. Obtain them with window_pixel_scale before calling this. Returns None for SDL events that have no UI representation (timers, audio device changes, etc.).

Compute logical→physical pixel scale for one window. Returns (scale_x, scale_y). Both default to 1.0 when the window is zero-size or the query fails.

Types

11 members

Platform-neutral input event. Donor: oa/ui/event.h UiEvent.

Source
0 members

Modifier key bitmask (matches donor UiModifier* constants).

Source

Enums

Discriminant for InputEvent. Donor: UiEventType.

None · MouseMove · MouseDown · MouseUp · MouseScroll · KeyDown · KeyUp · KeyChar · WindowResize · WindowClose · WindowFocus · WindowBlur · Pinch · TextEditing · MouseEnter · MouseLeave · GamepadButtonDown · GamepadButtonUp · GamepadAxisMotion

Platform-neutral keyboard key identifier (SDL3 scancode values).

Unknown = 0 · A = 4 · B = 5 · C = 6 · D = 7 · E = 8 · F = 9 · G = 10 · H = 11 · I = 12 · J = 13 · K = 14 · L = 15 · M = 16 · N = 17 · O = 18 · P = 19 · Q = 20 · R = 21 · S = 22 · T = 23 · U = 24 · V = 25 · W = 26 · X = 27 · Y = 28 · Z = 29 · Num1 = 30 · Num2 = 31 · Num3 = 32 · Num4 = 33 · Num5 = 34 · Num6 = 35 · Num7 = 36 · Num8 = 37 · Num9 = 38 · Num0 = 39 · Return = 40 · Escape = 41 · Backspace = 42 · Tab = 43 · Space = 44 · Minus = 45 · Equals = 46 · Comma = 54 · Period = 55 · Slash = 56 · F1 = 58 · F2 = 59 · F3 = 60 · F4 = 61 · F5 = 62 · F6 = 63 · F7 = 64 · F8 = 65 · F9 = 66 · F10 = 67 · F11 = 68 · F12 = 69 · Home = 74 · Delete = 76 · End = 77 · Right = 79 · Left = 80 · Down = 81 · Up = 82 · KpEnter = 88 · Kp1 = 89 · Kp2 = 90 · Kp3 = 91 · Kp4 = 92 · Kp5 = 93 · Kp6 = 94 · Kp7 = 95 · Kp8 = 96 · Kp9 = 97 · Kp0 = 98

Phase of a multi-touch pinch gesture.

None · Begin · Update · End

Classified scroll gesture — maps to donor UiScrollGesture.

None · MouseWheel · TouchpadPan · PinchScroll

Constants & Variables

Types

11 members

Platform-neutral input event. Donor: oa/ui/event.h UiEvent.

Source
0 members

Modifier key bitmask (matches donor UiModifier* constants).

Source
3 members

Enums

Discriminant for InputEvent. Donor: UiEventType.

None · MouseMove · MouseDown · MouseUp · MouseScroll · KeyDown · KeyUp · KeyChar · WindowResize · WindowClose · WindowFocus · WindowBlur · Pinch · TextEditing · MouseEnter · MouseLeave · GamepadButtonDown · GamepadButtonUp · GamepadAxisMotion

Platform-neutral keyboard key identifier (SDL3 scancode values).

Unknown = 0 · A = 4 · B = 5 · C = 6 · D = 7 · E = 8 · F = 9 · G = 10 · H = 11 · I = 12 · J = 13 · K = 14 · L = 15 · M = 16 · N = 17 · O = 18 · P = 19 · Q = 20 · R = 21 · S = 22 · T = 23 · U = 24 · V = 25 · W = 26 · X = 27 · Y = 28 · Z = 29 · Num1 = 30 · Num2 = 31 · Num3 = 32 · Num4 = 33 · Num5 = 34 · Num6 = 35 · Num7 = 36 · Num8 = 37 · Num9 = 38 · Num0 = 39 · Return = 40 · Escape = 41 · Backspace = 42 · Tab = 43 · Space = 44 · Minus = 45 · Equals = 46 · Comma = 54 · Period = 55 · Slash = 56 · F1 = 58 · F2 = 59 · F3 = 60 · F4 = 61 · F5 = 62 · F6 = 63 · F7 = 64 · F8 = 65 · F9 = 66 · F10 = 67 · F11 = 68 · F12 = 69 · Home = 74 · Delete = 76 · End = 77 · Right = 79 · Left = 80 · Down = 81 · Up = 82 · KpEnter = 88 · Kp1 = 89 · Kp2 = 90 · Kp3 = 91 · Kp4 = 92 · Kp5 = 93 · Kp6 = 94 · Kp7 = 95 · Kp8 = 96 · Kp9 = 97 · Kp0 = 98

Shared donor timing policy for widget and viewport transitions.

Normal · Fast · Fastest · Instant

Phase of a multi-touch pinch gesture.

None · Begin · Update · End

Classified scroll gesture — maps to donor UiScrollGesture.

None · MouseWheel · TouchpadPan · PinchScroll

Constants & Variables

pub const INPUT_MOD_ALT: InputModifiers = _; // 4u32Source
pub const INPUT_MOD_CTRL: InputModifiers = _; // 2u32Source
pub const INPUT_MOD_SHIFT: InputModifiers = _; // 1u32Source
pub const INPUT_MOD_SUPER: InputModifiers = _; // 8u32Source

Functions

Take the absolute value of every FP32 matrix element. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.

Add two matrices elementwise using multidirectional broadcasting. Shapes use multidirectional broadcasting over at most eight axes. The I32 route uses two’s-complement wrapping arithmetic. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.

Add a scalar to every FP32 matrix element. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.

Index of the maximum value in an FP32 matrix, returned as i64. dim is retained for donor signature parity and must be -1. The reduction result is read back synchronously, which is an explicit host-observation boundary: it submits pending work and waits. Errors Returns an error when the input is empty or not FP32, dim is not -1, the element count exceeds the shader ABI, allocation fails, or recording, submission, completion, or readback fails.

Add a bias matrix to another matrix elementwise using multidirectional broadcasting. Shapes use multidirectional broadcasting over at most eight axes. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.

Count rows whose last-axis FP32 argmax equals the integer class label. The returned [1] U32 Matrix remains device-resident. Reading it is an explicit synchronization boundary. Errors Returns an error when logits are not a nonempty rank-two-or-greater FP32 Matrix, labels do not match the leading logits shape or use U8/U32/I32, inputs belong to different engines, a size exceeds the shader ABI, allocation fails, or recording fails.

Apply the additive causal mask to the final two score dimensions. Every [.., Tq, Tk] plane keeps positions k <= q and writes -1e9 above the diagonal, matching OA C++ FnMatrix::causalMask. Inputs require at least two axes; earlier axes are treated as a flattened batch. Errors Returns an error when input is not FP32, has fewer than two axes or an empty extent, its element count exceeds the shader ABI, allocation fails, or runtime recording fails.

Cap every FP32 matrix element at an upper bound. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.

Raise every FP32 matrix element to a lower bound. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.

Compact the selected rows of input on device without host readback. input is [T, D] FP32 and mask is [T] FP32; one workgroup runs the donor chunked prefix scan so row_map, count, and dispatch_args stay device-resident, matching OA C++ FnMatrix::compactRows. values keeps fixed [T, D] capacity with unselected slots zeroed. Errors Returns an error when input is not rank-two FP32, mask is not FP32 with T elements, an extent exceeds the shader ABI, allocation fails, or runtime recording fails.

Concatenate one or more same-dtype matrices along one axis. This is the direct Rust spelling of OA C++ FnMatrix::concat. One semantic operation lowers to one copy-region dispatch per nonempty input. Errors Returns an error when there are no inputs, rank is outside one through four, dtype, engine, rank, or non-concatenated extents differ, the axis is invalid, shape or shader-ABI arithmetic overflows, allocation fails, or recording fails.

Deep-copy a dense matrix into independent device storage. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.

Take the cosine of every FP32 matrix element. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.

Divide two FP32 matrices elementwise using multidirectional broadcasting. Shapes use multidirectional broadcasting over at most eight axes. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.

Divide every FP32 matrix element by a scalar. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.

Apply inverted Dropout with a Philox-generated mask. Kept values are scaled by 1 / (1 - probability). The effective seed is retained for the reverse pass, and captured execution advances its random counter once per replay without rebuilding the graph. Errors Returns an error unless input is FP32, probability is finite and in [0, 1), or runtime allocation/recording fails.

Compare every FP32 element with one scalar and return an FP32 zero/one mask. Equality follows the device’s ordinary IEEE comparison: NaN never compares equal, while positive and negative zero compare equal. The result is intentionally detached because a discrete mask has no admitted adjoint. Errors Returns an error when input is not FP32, its element count exceeds the shader ABI, allocation fails, or runtime recording fails.

Take the exponential of every FP32 matrix element. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.

Create an FP32 matrix on this thread’s default engine. Errors Returns an error when the default engine cannot be initialized, the shape does not match values, or allocation and upload fail.

Create an FP32 matrix filled with value. Errors Returns an error when the shape or storage size overflows, or allocation and upload fail.

Gather rows from an FP32 table using arbitrary-shape integer indices. The table must be [rows,width]; indices are flattened and output is [num_indices,width], matching OA C++ FnMatrix::gather. U8, U32, and I32 indices use one bounded kernel. Invalid rows produce NaN without reading outside the table. Errors Returns an error for incompatible rank, dtype, Engine ownership, shader ABI, allocation, or recording.

Gather I32-selected elements from every row’s final axis. input is FP32 [R, C] and indices is I32 [R, K]; the result is FP32 [R, K]. Out-of-range indices produce zero, matching OA C++. Repeated indices accumulate deterministically in the reverse pass. Errors Returns an error unless both inputs are rank two on the same engine, row counts agree, dtypes match the contract, the input width is positive, sizes fit the shader ABI, allocation fails, or runtime recording fails.

Compare every FP32 element with one scalar and return an FP32 zero/one mask for input >= value. Ordering follows the device’s ordinary IEEE comparison: NaN always produces zero. The result is intentionally detached because a discrete mask has no admitted adjoint. Errors Returns an error under the same contract as equal.

Take the natural logarithm of every FP32 matrix element. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.

Stable LogSoftmax over dim, where -1 selects the last dimension. The operation records asynchronously and returns its output immediately. Errors Returns an error when the input is empty or not FP32, dim is invalid, an axis extent or dispatch count exceeds the shader ABI, allocation fails, or runtime recording fails.

Count correct categorical predictions only where the FP32 mask is nonzero. The returned [1] U32 Matrix remains device-resident. Reading it is an explicit synchronization boundary. Errors Returns an error under the same conditions as categorical_accuracy_count, or when the mask is not FP32, does not match the labels shape, or belongs to another engine.

Multiply A by the transpose of B using the OA weight-layout convention. left has shape [M, K], right has shape [N, K], and the returned matrix has shape [M, N]. This matches OA’s native weight-layout convention and does not transpose storage. The call records device work and returns without a host wait. Errors Returns an error when either input is not a rank-two FP32 matrix, their K extents differ, they belong to different engines, a dimension exceeds the admitted shader ABI, or allocation or recording fails.

Full FP32 maximum reduction into a [1] result. dim is retained for donor signature parity and must be -1; axis maxima are not admitted. The operation records asynchronously. Errors Returns an error when the input is empty or not FP32, dim is not -1, the element count exceeds the shader ABI, allocation fails, or recording fails.

Arithmetic mean of all values when dim is -1, or one selected axis. The semantic operation lowers to one Sum stage followed by one Scale stage, matching the donor composite. A full reduction returns shape [1]; an axis reduction preserves rank and replaces the selected extent with one. Errors Returns an error when the input is empty or not FP32, dim is invalid, a size exceeds the admitted shader ABI, allocation fails, or recording fails.

Build a stable dropless expert-major plan from I32 [T, K] indices. Within every expert, routes preserve their original token-major order. The operation accepts at most 256 experts, matching the shader’s shared state. Errors Returns an error unless indices are nonempty rank-two I32, the expert count is in 1..=256, sizes fit the admitted ABI, allocation succeeds, or runtime recording succeeds.

Update an FP32 expert-routing bias from a dense FP32 selection mask. selection_mask is [T, E]; bias may be [E] or [1, E]. Each expert receives -gamma, +gamma, or no update when its observed route count is above, below, or equal to the balanced target T * K / E. The update stays device-resident and mutates bias through its existing value identity. Errors Returns an error unless both matrices are FP32 on the same engine, the mask and bias shapes agree, experts_per_token is in 1..=E, gamma is finite and positive, dimensions fit the shader ABI, or runtime recording fails.

Multiply two FP32 matrices elementwise. Shapes use multidirectional broadcasting over at most eight axes. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.

Negate every FP32 matrix element. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.

Create an FP32 matrix filled with ones. Errors Returns an error when the shape or storage size overflows, or allocation and upload fail.

Generate normally distributed FP32 values with input’s shape. Errors Returns an error unless input is FP32, mean and stddev are finite, stddev is nonnegative, or runtime allocation/recording fails.

Generate uniformly distributed FP32 values with input’s shape. input supplies shape, dtype, engine, and semantic lineage; its values are not read. A nonzero seed is exact. Zero consumes the thread-local seed sequence controlled by set_rng_seed. Errors Returns an error unless input is FP32, low < high, both bounds are finite, or runtime allocation/recording fails.

Raise every FP32 matrix element to a scalar exponent. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.

Take the reciprocal of every FP32 matrix element. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.

Repeat every FP32 element along one matrix axis. This is the direct Rust spelling of OA C++ FnMatrix::repeatInterleave. Rank-one through rank-four matrices are currently admitted. Errors Returns an error for an unsupported rank or dtype, non-positive repeat count, invalid axis, shape/ABI overflow, allocation failure, or recording failure.

Return a zero-copy dense view with a different shape. The result owns a new semantic value identity but shares storage, pending execution state, dtype, and element order with input. When a gradient tape is active, its adjoint reshapes the incoming gradient back to the input shape. Errors Returns an error when the requested shape overflows or changes the number of elements.

Sample one I32 class index from each final-axis row of FP32 logits. Nonpositive temperature selects the first maximum deterministically. Positive temperature uses the donor Philox categorical route; positive top_k restricts candidates and top_p applies nucleus truncation after descending TopK. Rank-one input is treated as one row. Errors Returns an error when logits are not nonempty rank-one or rank-two FP32, a sorted candidate count exceeds 1024, sizes do not fit the shader ABI, allocation fails, or runtime recording fails.

Multiply every FP32 matrix element by a scalar. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.

Add the compacted source rows into input at their saved positions. Both matrices are matching [T, D] FP32; row_map and count are the U32 device plan from compact_rows. Each output element is input[i] plus source[packed_row, d] when the row is selected, matching OA C++ FnMatrix::scatterRows in its direct-dispatch form. Errors Returns an error when shapes or dtypes disagree, the auxiliary inputs are not U32, an extent exceeds the shader ABI, or recording fails.

Add the compacted source rows into a copy of input through a GPU-authored indirect dispatch. plan is the CompactRowsResult produced by compact_rows. Every unselected row is preserved by the initial copy and only count * D selected values are touched, matching OA C++ FnMatrix::scatterRows in its indirect plan-taking form. Errors Returns an error when shapes or dtypes disagree, the plan does not hold a valid U32 [T]/[1]/[3] triple, an extent exceeds the shader ABI or device dispatch limit, or recording fails.

Replace the current thread’s implicit random seed source. Explicit nonzero operation seeds bypass this state. Passing zero to a Philox operation consumes one value from this deterministic thread-local sequence.

Take the sine of every FP32 matrix element. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.

Materialize a half-open interval along one matrix axis. This is the direct Rust spelling of OA C++ FnMatrix::slice. The current checkpoint admits rank-one through rank-four FP32 matrices. Errors Returns an error when the rank, dtype, axis, range, shader ABI, allocation, or runtime recording contract is invalid.

Stable Softmax over dim, where -1 selects the last dimension. The operation records asynchronously and returns its output immediately. Errors Returns an error when the input is empty or not FP32, dim is invalid, an axis extent or dispatch count exceeds the shader ABI, allocation fails, or runtime recording fails.

Split input along dim into one device-resident matrix per sizes entry. Every output owns an independent copy of its [offset, offset + size) slice along dim, matching OA C++ FnMatrix::split. The family records as one variadic semantic operation whose physical lowering is one slice dispatch per output; each output also carries a Slice adjoint, so reverse differentiation flows only through the segments used downstream. Errors Returns an error when input is not FP32 or has rank outside 1..=4, dim is outside the rank, sizes is empty, contains a non-positive extent, or does not sum to the dim extent, an output size exceeds the shader ABI, allocation fails, or runtime recording fails.

Take the square root of every FP32 matrix element. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.

Subtract two FP32 matrices elementwise using multidirectional broadcasting. Shapes use multidirectional broadcasting over at most eight axes. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.

Subtract a scalar from every FP32 matrix element. The call records device work and returns without a host wait. Errors Returns an error when the shape, dtype, ownership, allocation, or recording contract fails.

Sum all values when dim is -1, or keep and reduce one selected axis. A full reduction returns shape [1]; an axis reduction preserves rank and replaces the selected extent with one. The operation records asynchronously. Errors Returns an error when the input is empty or not FP32, dim is invalid, a size exceeds the admitted shader ABI, allocation fails, or recording fails.

Return the largest k FP32 values and their I32 indices on the last axis. Rank-one and rank-two inputs are admitted. dim may be -1 or the exact last-axis index. Values are sorted descending; ties select lower indices. k is clamped to the last-axis extent, matching OA C++. Errors Returns an error for an unsupported rank, dtype, axis, negative k, a request above the admitted 1024-entry GPU limit, an empty last axis, size overflow, allocation failure, or runtime recording failure.

Expand I32 [T, K] expert indices into an exact FP32 [T, E] mask. Errors Returns an error unless the input is nonempty rank-two I32, num_experts is positive, all sizes fit the shader ABI, or runtime recording fails.

Materialize a swap of the last two axes of a rank-two or rank-three Matrix. dim0 and dim1 accept positive or negative axes, but the current donor contract only admits the final two axes in either order. The result owns new storage and preserves the input dtype and batch order. Errors Returns an error unless the input is rank-two or rank-three F32, the axes select the distinct final two dimensions, all geometry fits the shader ABI, allocation succeeds, and runtime recording succeeds.

Types

0 members

Device-resident row-compaction plan returned by compact_rows. row_map, count, and dispatch_args are auxiliary device values; only values participates in differentiation. dispatch_args is consumed by the indirect-dispatch variants scatter_rows_indirect, crate::matrix::compact_rows_backward, and crate::matrix::scatter_rows_backward.

Source
78 members

Device-visible numeric storage with explicit shape and dtype semantics. Arithmetic operators delegate to crate::matrix and return Result<Matrix>: use let sum = (&left + &right)?;. They preserve validation, allocation, and recording failures without panicking. Multiplication is elementwise; use crate::matrix::mat_mul_nt for matrix multiplication.

Source
0 members

Device-resident stable dropless route plan returned by moe_expert_plan.

Source
0 members

Largest values and exact I32 source indices returned by top_k.

Source

Functions

Types

4 members
0 members
0 members
[[f64; 3]; 3]
Source
0 members
[[f64; 4]; 4]
Source
0 members
f64
f64
f64
f64
Source
0 members
0 members
0 members
f64
f64
f64
Source
0 members
f64
f64
f64
f64
Source
0 members
44 members

A floating-point scalar admitted by VLM. This sealed trait limits packed VLM values to f32 and f64 while allowing their shared implementation to stay generic and dependency-free.

Source
30 members

A packed 3×3 row-major matrix.

[[T; 3]; 3]
Source
53 members

A packed 4×4 row-major matrix.

[[T; 4]; 4]
Source
46 members

A packed vector-first quaternion (x, y, z, w).

Constructs an axis-angle rotation, returning None for invalid input.

static

Constructs an axis-angle rotation, returning None for invalid input.

method

Constructs an axis-angle rotation, returning None for invalid input.

method

Constructs an axis-angle rotation, returning None for invalid input.

method

Constructs an axis-angle rotation, returning None for invalid input.

method

Constructs an axis-angle rotation, returning None for invalid input.

method
method

Constructs an axis-angle rotation, returning None for invalid input.

method

Constructs an axis-angle rotation, returning None for invalid input.

method
Source
4 members
32 members

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method
method
Source
47 members

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method
method
Source
33 members

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method

Returns a unit vector, or None for a zero-length or non-finite value.

method
method
Source
7 members

Enums

Explicit Euler-axis application order.

Xyz · Xzy · Yxz · Yzx · Zxy · Zyx

Constants & Variables

pub const INVERSE_TOLERANCE: f32 = _; // 3.81469727E-6f32Source
pub const PI: f32 = std::f32::consts::PI; // 3.14159274f32Source
pub const TOLERANCE: f32 = 1.0e-5;Source

oa

Types

14 members
5 members
1 members
3 members
2 members
10 members
1 members

An ML-DSA-65 secret signing key. The implementation stores the standard 32-byte seed plus its expanded signing state; both are zeroized by the RustCrypto dependency on drop.

Source
10 members
5 members
5 members
9 members

Functions

Compute KMAC-256 according to NIST SP 800-185. Errors Returns an error when a bit length, encoded length, or allocation size overflows the platform or SP 800-185 u64 encoding.

Construct the inclusion proof for one leaf. Errors Returns an error for an empty tree or an out-of-range leaf index.

Compute the Merkle root, duplicating the final node of each odd level.

Types

14 members
5 members
3 members
2 members
10 members
5 members
5 members

Functions

Compute batched unsigned limb add. Operands are public U32 [batch, words] rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Returns same-width rows; arithmetic overflow/underflow wraps modulo 2^width. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute batched unsigned limb add mod. Operands are public U32 [batch, words] rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Returns (output, status) with U32 [batch] status flags. modulus is U32 [1, words] or [batch, words], with matching Engine ownership. A zero modulus returns status 0 and zero output; valid rows return status 1. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute public-data add_scalar on unsigned device limb rows. Operands are public rank-two U32 rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Unsigned scalar arithmetic wraps within the complete declared limb width. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute batched unsigned limb barrett multiply. Operands are public U32 [batch, words] rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Returns (output, status) with U32 [batch] status flags. modulus is U32 [1, words] or [batch, words], with matching Engine ownership. A zero modulus returns status 0 and zero output; valid rows return status 1. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute batched unsigned limb bit and. Operands are public U32 [batch, words] rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Returns same-width rows; arithmetic overflow/underflow wraps modulo 2^width. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute batched unsigned limb bit not. Operands are public U32 [batch, words] rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Returns the complement within the complete fixed operand width. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute batched unsigned limb bit or. Operands are public U32 [batch, words] rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Returns same-width rows; arithmetic overflow/underflow wraps modulo 2^width. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute batched unsigned limb bit xor. Operands are public U32 [batch, words] rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Returns same-width rows; arithmetic overflow/underflow wraps modulo 2^width. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute batched unsigned limb compare. Operands are public U32 [batch, words] rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Returns U32 [batch] order codes: 0 less, 1 equal, 2 greater. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute public-data compare_scalar on unsigned device limb rows. Operands are public rank-two U32 rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Returns U32 order codes: 0 less, 1 equal, 2 greater. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute batched unsigned limb div rem. Operands are public U32 [batch, words] rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Returns (quotient, remainder, status); status is U32 [batch]. A zero divisor produces status 0, quotient 0 and remainder equal to the dividend. Otherwise status is 1 and division is exact. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute public-data div_rem_mixed on unsigned device limb rows. Operands are public rank-two U32 rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Division returns (quotient, remainder, status): 1 success, 0 zero divisor, 2 quotient overflow. Invalid rows have completely zero outputs. The divisor may be one shared row. Mixed division accepts independent dividend (1..=256), divisor (1..=128) and quotient (1..=256) word counts; wide/narrow division takes a double-width dividend. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute public-data div_rem_narrow on unsigned device limb rows. Operands are public rank-two U32 rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Division returns (quotient, remainder, status): 1 success, 0 zero divisor, 2 quotient overflow. Invalid rows have completely zero outputs. The divisor may be one shared row. Mixed division accepts independent dividend (1..=256), divisor (1..=128) and quotient (1..=256) word counts; wide/narrow division takes a double-width dividend. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute public-data div_rem_scalar on unsigned device limb rows. Operands are public rank-two U32 rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Returns (quotient, remainder, status). Scalar zero yields status 0 and zero outputs; valid status is 1. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute public-data div_rem_wide on unsigned device limb rows. Operands are public rank-two U32 rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Division returns (quotient, remainder, status): 1 success, 0 zero divisor, 2 quotient overflow. Invalid rows have completely zero outputs. The divisor may be one shared row. Mixed division accepts independent dividend (1..=256), divisor (1..=128) and quotient (1..=256) word counts; wide/narrow division takes a double-width dividend. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute batched unsigned limb from montgomery. Operands are public U32 [batch, words] rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Returns (output, status) with U32 [batch] status flags. modulus is U32 [1, words] or [batch, words], with matching Engine ownership. A zero modulus returns status 0 and zero output; valid rows return status 1. Montgomery operations require an odd modulus; even moduli return status 0 and zero output. R = 2^(32words). Conversion multiplies by R or R^-1; multiplication computes ab*R^-1 modulo m. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute public-data from_u32 on unsigned device limb rows. Operands are public rank-two U32 rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Zero-extends one-word U32 or two-word U64 rows into the requested word width. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute public-data from_u64 on unsigned device limb rows. Operands are public rank-two U32 rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Zero-extends one-word U32 or two-word U64 rows into the requested word width. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute batched unsigned limb inverse mod. Operands are public U32 [batch, words] rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Returns (output, status) with U32 [batch] status flags. modulus is U32 [1, words] or [batch, words], with matching Engine ownership. A zero modulus returns status 0 and zero output; valid rows return status 1. Non-invertible values also return status 0 and zero output. Odd/even and composite moduli are accepted. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute batched unsigned limb leading zeros. Operands are public U32 [batch, words] rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Returns U32 [batch] leading-zero counts in the complete operand width; zero returns width_bits. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute batched unsigned limb montgomery multiply. Operands are public U32 [batch, words] rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Returns (output, status) with U32 [batch] status flags. modulus is U32 [1, words] or [batch, words], with matching Engine ownership. A zero modulus returns status 0 and zero output; valid rows return status 1. Montgomery operations require an odd modulus; even moduli return status 0 and zero output. R = 2^(32words). Conversion multiplies by R or R^-1; multiplication computes ab*R^-1 modulo m. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute batched unsigned limb multiply high. Operands are public U32 [batch, words] rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Returns the upper half of the exact double-width product, with all low-half carries retained. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute batched unsigned limb multiply low. Operands are public U32 [batch, words] rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Returns same-width rows; arithmetic overflow/underflow wraps modulo 2^width. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute batched unsigned limb multiply mod. Operands are public U32 [batch, words] rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Returns (output, status) with U32 [batch] status flags. modulus is U32 [1, words] or [batch, words], with matching Engine ownership. A zero modulus returns status 0 and zero output; valid rows return status 1. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute public-data multiply_scalar on unsigned device limb rows. Operands are public rank-two U32 rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Unsigned scalar arithmetic wraps within the complete declared limb width. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute batched unsigned limb multiply wide. Operands are public U32 [batch, words] rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Returns exact double-width rows (up to 8192 output bits). Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute batched unsigned limb pow mod. Operands are public U32 [batch, words] rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Returns (output, status) with U32 [batch] status flags. modulus is U32 [1, words] or [batch, words], with matching Engine ownership. A zero modulus returns status 0 and zero output; valid rows return status 1. right is the unsigned exponent; zero exponents yield 1 modulo m, including 0^0. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Reduce double-width public rows using a prepared immutable Barrett snapshot. Returns (output, status): one for success, zero for a zero modulus, two when T is outside the significant-width Barrett bound T < 2^(64*k). Invalid rows produce zero. The prepared modulus may have one shared row. Errors Rejects dtype, shape, ownership, byte extents, allocation or recording failures.

Compute batched unsigned limb reduce mod. Operands are public U32 [batch, words] rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Returns (output, status) with U32 [batch] status flags. modulus is U32 [1, words] or [batch, words], with matching Engine ownership. A zero modulus returns status 0 and zero output; valid rows return status 1. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute public-data reduce_montgomery on unsigned device limb rows. Operands are public rank-two U32 rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Returns (output, status). Computes T * R^-1 mod m for a double-width T. R = 2^(32*words); odd nonzero m is required. Invalid rows are zero. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Prepare a device-owned public Barrett modulus snapshot and reciprocal. Errors Rejects dtype, rank, width, byte extents, allocation or recording failures.

Compute batched unsigned limb shift left. Operands are public U32 [batch, words] rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Shifts at or beyond the operand width produce zero; discarded bits are lost. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute batched unsigned limb shift right. Operands are public U32 [batch, words] rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Shifts at or beyond the operand width produce zero; discarded bits are lost. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute batched unsigned limb square mod. Operands are public U32 [batch, words] rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Returns (output, status) with U32 [batch] status flags. modulus is U32 [1, words] or [batch, words], with matching Engine ownership. A zero modulus returns status 0 and zero output; valid rows return status 1. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute batched unsigned limb square wide. Operands are public U32 [batch, words] rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Returns exact double-width rows (up to 8192 output bits). Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute batched unsigned limb subtract. Operands are public U32 [batch, words] rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Returns same-width rows; arithmetic overflow/underflow wraps modulo 2^width. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute batched unsigned limb subtract mod. Operands are public U32 [batch, words] rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Returns (output, status) with U32 [batch] status flags. modulus is U32 [1, words] or [batch, words], with matching Engine ownership. A zero modulus returns status 0 and zero output; valid rows return status 1. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute public-data subtract_scalar on unsigned device limb rows. Operands are public rank-two U32 rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Unsigned scalar arithmetic wraps within the complete declared limb width. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute batched unsigned limb to montgomery. Operands are public U32 [batch, words] rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Returns (output, status) with U32 [batch] status flags. modulus is U32 [1, words] or [batch, words], with matching Engine ownership. A zero modulus returns status 0 and zero output; valid rows return status 1. Montgomery operations require an odd modulus; even moduli return status 0 and zero output. R = 2^(32words). Conversion multiplies by R or R^-1; multiplication computes ab*R^-1 modulo m. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute public-data to_u32 on unsigned device limb rows. Operands are public rank-two U32 rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Returns (output, status); 1 means exact conversion, 0 means overflow with zero output. U64 values use two little-endian U32 words per row, without shaderInt64. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Compute public-data to_u64 on unsigned device limb rows. Operands are public rank-two U32 rows of little-endian limbs, with 1..=128 words (32..=4096 bits). Records device work without host reads or a host wait. This public-data route does not accept cryptographic secrets and makes no constant-time or performance claim. Returns (output, status); 1 means exact conversion, 0 means overflow with zero output. U64 values use two little-endian U32 words per row, without shaderInt64. Errors Rejects rank, dtype, shape, ownership, address limits, allocation or recording failures.

Types

3 members

Immutable device snapshot of a public modulus and its exact Barrett reciprocal. Constructed by setup_barrett; the encoded device rows cannot be supplied or modified by callers. Preparation records device work and does not read the modulus on the host. Each row keeps its own significant width and reciprocal.

Source

Functions

Apply Keccak-f[1600] independently to every 200-byte row. Errors Rejects invalid shapes, dtypes, shader address limits, allocation or recording failures.

Build selected SHAKE-256 Merkle inclusion proofs entirely on the device. leaves is U8 [leaf_count, 32]; indices is rank-one U32. Output is U8 [proof_count, 16 + depth * 32]. The little-endian four-word header is [version=1, leaf_count, leaf_index, valid], followed by siblings bottom-up. Out-of-range device indices set valid=0 and zero every sibling. Empty selections return ready empty storage. No host observation of indices occurs. Errors Rejects metadata, ownership, address limits, allocation or recording failures.

Reduce any non-empty batch of 32-byte leaf hashes to one Merkle root. Duplicates the final node of each odd level, matching the OA CPU tree. Errors Rejects invalid shapes, dtypes, shader address limits, allocation or recording failures.

Apply the pinned Plonky3 babybear16 Poseidon2 field sponge. U32 rows contain field elements, reduced modulo the named prime. The OA sponge has capacity eight and explicit length/domain framing. It is not a claim of NVIDIA sponge wire compatibility. Errors Rejects dtype, rank, width, address limits, allocation or recording failures.

Apply the pinned Plonky3 babybear16 Poseidon2 permutation. U32 rows contain field elements, reduced modulo the named prime. The OA sponge has capacity eight and explicit length/domain framing. It is not a claim of NVIDIA sponge wire compatibility. Errors Rejects dtype, rank, width, address limits, allocation or recording failures.

Apply the pinned Plonky3 babybear24 Poseidon2 field sponge. U32 rows contain field elements, reduced modulo the named prime. The OA sponge has capacity eight and explicit length/domain framing. It is not a claim of NVIDIA sponge wire compatibility. Errors Rejects dtype, rank, width, address limits, allocation or recording failures.

Apply the pinned Plonky3 babybear24 Poseidon2 permutation. U32 rows contain field elements, reduced modulo the named prime. The OA sponge has capacity eight and explicit length/domain framing. It is not a claim of NVIDIA sponge wire compatibility. Errors Rejects dtype, rank, width, address limits, allocation or recording failures.

Apply the pinned Plonky3 koalabear16 Poseidon2 field sponge. U32 rows contain field elements, reduced modulo the named prime. The OA sponge has capacity eight and explicit length/domain framing. It is not a claim of NVIDIA sponge wire compatibility. Errors Rejects dtype, rank, width, address limits, allocation or recording failures.

Apply the pinned Plonky3 koalabear16 Poseidon2 permutation. U32 rows contain field elements, reduced modulo the named prime. The OA sponge has capacity eight and explicit length/domain framing. It is not a claim of NVIDIA sponge wire compatibility. Errors Rejects dtype, rank, width, address limits, allocation or recording failures.

Apply the pinned Plonky3 koalabear24 Poseidon2 field sponge. U32 rows contain field elements, reduced modulo the named prime. The OA sponge has capacity eight and explicit length/domain framing. It is not a claim of NVIDIA sponge wire compatibility. Errors Rejects dtype, rank, width, address limits, allocation or recording failures.

Apply the pinned Plonky3 koalabear24 Poseidon2 permutation. U32 rows contain field elements, reduced modulo the named prime. The OA sponge has capacity eight and explicit length/domain framing. It is not a claim of NVIDIA sponge wire compatibility. Errors Rejects dtype, rank, width, address limits, allocation or recording failures.

Hash each U8 [batch, message_bytes] row with SHA224. Returns exact 28-byte digest rows without padding. Empty messages are valid. Records device work without a host wait. Ordinary Matrix storage is public data; secret-bearing hashing requires the separate secret execution boundary. Errors Rejects invalid rank, dtype, batch size, address limits, allocation or recording failures.

Hash each U8 [batch, message_bytes] row with SHA256. Returns exact 32-byte digest rows without padding. Empty messages are valid. Records device work without a host wait. Ordinary Matrix storage is public data; secret-bearing hashing requires the separate secret execution boundary. Errors Rejects invalid rank, dtype, batch size, address limits, allocation or recording failures.

Hash each U8 [batch, message_bytes] row with SHA384. Returns exact 48-byte digest rows without padding. Empty messages are valid. Records device work without a host wait. Ordinary Matrix storage is public data; secret-bearing hashing requires the separate secret execution boundary. Errors Rejects invalid rank, dtype, batch size, address limits, allocation or recording failures.

Hash each U8 [batch, message_bytes] row with SHA3-224. Returns exact 28-byte digest rows without padding. Empty messages are valid. Records device work without a host wait. Ordinary Matrix storage is public data; secret-bearing hashing requires the separate secret execution boundary. Errors Rejects invalid rank, dtype, batch size, address limits, allocation or recording failures.

Hash each U8 [batch, message_bytes] row with SHA3-256. Returns exact 32-byte digest rows without padding. Empty messages are valid. Records device work without a host wait. Ordinary Matrix storage is public data; secret-bearing hashing requires the separate secret execution boundary. Errors Rejects invalid rank, dtype, batch size, address limits, allocation or recording failures.

Hash each U8 [batch, message_bytes] row with SHA3-384. Returns exact 48-byte digest rows without padding. Empty messages are valid. Records device work without a host wait. Ordinary Matrix storage is public data; secret-bearing hashing requires the separate secret execution boundary. Errors Rejects invalid rank, dtype, batch size, address limits, allocation or recording failures.

Hash each U8 [batch, message_bytes] row with SHA3-512. Returns exact 64-byte digest rows without padding. Empty messages are valid. Records device work without a host wait. Ordinary Matrix storage is public data; secret-bearing hashing requires the separate secret execution boundary. Errors Rejects invalid rank, dtype, batch size, address limits, allocation or recording failures.

Hash each U8 [batch, message_bytes] row with SHA512. Returns exact 64-byte digest rows without padding. Empty messages are valid. Records device work without a host wait. Ordinary Matrix storage is public data; secret-bearing hashing requires the separate secret execution boundary. Errors Rejects invalid rank, dtype, batch size, address limits, allocation or recording failures.

Hash each U8 [batch, message_bytes] row with SHA-512/224. Returns exact 28-byte digest rows without padding. Empty messages are valid. Records device work without a host wait. Ordinary Matrix storage is public data; secret-bearing hashing requires the separate secret execution boundary. Errors Rejects invalid rank, dtype, batch size, address limits, allocation or recording failures.

Hash each U8 [batch, message_bytes] row with SHA-512/256. Returns exact 32-byte digest rows without padding. Empty messages are valid. Records device work without a host wait. Ordinary Matrix storage is public data; secret-bearing hashing requires the separate secret execution boundary. Errors Rejects invalid rank, dtype, batch size, address limits, allocation or recording failures.

Hash every row with SHAKE-128. An output_length of zero selects 16 bytes. Output rows are padded to an eight-byte boundary, matching the OA donor ABI. Errors Rejects invalid shapes, dtypes, shader address limits, allocation or recording failures.

Hash every row with SHAKE-256. An output_length of zero selects 32 bytes. Output rows are padded to an eight-byte boundary, matching the OA donor ABI. Errors Rejects invalid shapes, dtypes, shader address limits, allocation or recording failures.

Verify version-one SHAKE-256 inclusion proof frames on the device. Leaves are U8 [proof_count, 32]; proofs have the frame layout returned by leaf_count must come from trusted tree metadata, not the proof header. merkle_proofs. Roots are U8 [1, 32] or [proof_count, 32]. Return rank-one U32 flags, exactly zero or one per row. Malformed headers, indices, duplicate-last paths, tampered leaves or roots return zero. Empty batches return ready empty storage; no input content is read on the host. Errors Rejects metadata, ownership, address limits, allocation or recording failures.

Functions

Build retained device tree levels using the selected parent hash. Leaves are prehashed U8/U32 rows with the algorithm’s exact digest extent. Poseidon2 nodes use OA’s versioned field framing, not NVIDIA wire semantics. Errors Rejects dtype, rank, extent, leaf count, allocation or recording failures.

Produce version-two inclusion frames for U32 [batch] leaf indices. Frames carry the original count, index, hash identity and validity flag. Out-of-range indices produce invalid, completely zero sibling paths. Errors Rejects dtype, rank, ownership, address limits, allocation or recording failures.

Compute roots of contiguous power-of-two subtrees for hierarchical construction. Records the first log2(subtree_leaves) tree levels. The returned rows can be passed to build to finish the tree; no leaf readback/repacking is involved. Errors Rejects dtype, rank, extent, partition sizes, allocation or recording failures.

Verify inclusion frames against roots and an independently trusted leaf count. Roots may contain one shared digest or one digest per proof. Malformed headers, identity/count mismatches and changed sibling paths return zero. Errors Rejects metadata, ownership, address limits, allocation or recording failures.

Types

Enums

Selected parent-hash identity; digest sizes are part of the contract.

Sha256 = 0 · Sha512 = 1 · Sha3_256 = 2 · Sha3_512 = 3 · Shake128 = 4 · Shake256 = 5 · Poseidon2BabyBear16 = 6 · Poseidon2BabyBear24 = 7 · Poseidon2KoalaBear16 = 8 · Poseidon2KoalaBear24 = 9

Functions

Compute a natural-order forward cyclic NTT, preserving field representation. Records staged GPU work with two reusable private buffers. It performs no tensor host reads, waits or per-stage host initialization. Errors Rejects dtype, shape, ownership, address limits, allocation or recording failures.

Compute a natural-order inverse cyclic NTT, preserving field representation. Records staged GPU work with two reusable private buffers. It performs no tensor host reads, waits or per-stage host initialization. Errors Rejects dtype, shape, ownership, address limits, allocation or recording failures.

Multiply pointwise in the configured prime field, preserving representation. Errors Rejects dtype, shape, ownership, address limits, allocation or recording failures.

Prepare forward/inverse Montgomery twiddles on the supplied Engine. Errors Rejects allocation, queried workgroup limits, ABI or recording failures.

Types

Enums

Field representation at the input/output boundary of a generic cyclic NTT.

Standard · Montgomery

Functions

Generate a random ML-DSA-65 key pair using the operating-system RNG.

Verify ML-DSA-65 signatures on the originating Vulkan device, empty context. Each workgroup processes one (message, signature, public_key) triple. Results are device-resident U32 [batch_size]: 1 = valid, 0 = invalid or malformed. Every invalid path in the shader writes 0; no short-circuit path converts an invalid signature to valid. Arguments messages — U8 rank-1 [total_message_bytes] flat byte buffer. msg_offsets — U32 rank-1 [batch_size] byte start of each message. msg_lengths — U32 rank-1 [batch_size] byte length of each message. signatures — U8 rank-1 [batch_size × 3309] packed signatures in FIPS 204 6.4 wire format. public_keys — U8 rank-1 [batch_size × 1952] packed public keys in FIPS 204 6.2 wire format. Errors Returns an error for mismatched shapes, dtypes, engines, address limits, or an unavailable Vulkan pipeline. Out-of-range message offsets and lengths produce 0 for that row without host readback of the offset/length vectors. Status Experimental. Named software Vulkan execution is a correctness checkpoint; physical-device, performance and side-channel qualification remain separate.

Verify a selected ML-DSA batch with one shared FIPS 204 context. context is a byte range within messages, of length at most 255. Message offsets still identify each row independently; the context is a zero-copy view and is framed as 0x00 || len(context) || context || message. The context may overlap a message. Use separate batches for different contexts. All other inputs and results follow verify_batch_with_parameters. Capture retains the message value and records the context range as semantic attributes. Rebinding that input also rebinds its context bytes. This is pure ML-DSA verification, not the distinct HashML-DSA prehash interface. Errors Rejects reversed, out-of-bounds, or longer-than-255-byte context ranges, including for empty batches, plus the errors of verify_batch. This Experimental public-data route does not admit private-key execution.

Verify a batch using the selected FIPS 204 parameter set, empty context. Inputs and results follow verify_batch. Packed key and signature strides are MlDsaParameters::public_key_size and MlDsaParameters::signature_size; selecting a different parameter set never truncates, pads, or converts the encodings. Errors Rejects mismatched shapes, dtypes, engines, address limits, or unavailable Vulkan pipelines. Malformed encodings and out-of-range message rows return zero on the device. This Experimental public-data operation does not admit private-key execution or claim physical-device qualification.

Types

1 members
10 members
1 members

An ML-DSA-65 secret signing key. The implementation stores the standard 32-byte seed plus its expanded signing state; both are zeroized by the RustCrypto dependency on drop.

Source
9 members

Enums

FIPS 204 parameter set for device-resident batch verification. Host key and signature types in this module continue to describe ML-DSA-65.

MlDsa44 · MlDsa65 · MlDsa87

Constants & Variables

pub const PUBLIC_KEY_SIZE: usize = contracts::ML_DSA_65_PUBLIC_KEY_SIZE; // 1_952usizeSource
pub const SIGNATURE_SIZE: usize = contracts::ML_DSA_65_SIGNATURE_SIZE; // 3_309usizeSource

Functions

Begin a deferred secret-execution batch on engine. Errors Rejects an active capture or a second concurrent scope.

Import FIPS 204 signing-key bytes with their encoded public U8 key. The secret input range is locked best-effort and erased before return; its upload becomes the retained device secret. Importing does not prove that the secret and public halves form a consistent key pair. Errors Rejects extent/ownership mismatches, capture, or submission errors.

Generate a retained ML-DSA-44/65/87 key from fresh OS entropy. Errors Rejects unsupported kernels, capture, allocation, entropy, or submission errors.

Sign public U8 message bytes with the FIPS 204 context (at most 255 bytes). Inputs retain the key’s Engine; neither input is copied to host. Errors Rejects dtype/ownership/alias/context errors, capture, or execution failure.

Decapsulate a correct-size public ciphertext using a retained device key. Errors Rejects dtype/owner/extent, capture, or execution errors. Ciphertext content rejection produces an opaque replacement secret, never an error or flag.

Import FIPS 203 decapsulation-key bytes. The embedded encapsulation key supplies the retained public value; the secret input range is locked best-effort and erased before return. Importing does not prove that the decapsulation key is well-formed. Errors Rejects extent mismatches, capture, or submission errors.

Generate a retained ML-KEM-512/768/1024 key from fresh OS entropy. Errors Rejects unsupported kernels, capture, allocation, entropy, or submission errors.

Declassify public bytes derived from a device shared secret. The secret never leaves private storage; keyed SHAKE-256 output is the only result. info is public customization data absorbed after the secret; length must be a nonzero multiple of four within 4096 bytes. Errors Rejects dtype/owner/extent errors, capture, or execution failure.

Types

0 members

Opaque decapsulation result. Correct-size malformed ciphertexts follow implicit rejection entirely on device; no validity flag is exposed.

DeviceSharedSecret
DeviceErasure
Source
0 members

Public derivation outcome. derived is the only public value produced from the opaque shared secret inside the keyed-hash boundary.

DeviceErasure
Source
0 members

Public ciphertext plus an opaque shared secret and public-key validity. A zero status rejects the encapsulation key; it is not a ciphertext oracle.

Source
2 members

Exact completion of explicit secret or transient-workspace erasure. Dropping the ticket neither waits nor cancels the retained command.

Source
4 members
4 members
1 members

Unique ML-KEM shared secret. No host read, export, or Matrix conversion.

Source
0 members

Public signing outcome. Status U32[1] is one on success, zero on failure. Signature bytes are zero on failure; observe status before using them.

Source
2 members

Deferred secret-execution batch owned by one Engine. While a scope is active, every engine submission — secret or ordinary — records without queueing; commit submits the ordered batch once. Operation events and erasure tickets issued inside the scope stay pending until commit and fail on abandonment. The batch carries only secret classification metadata, never secret bytes.

Source

Enums

FIPS 204 HashML-DSA identity and exact digest extent.

Sha256 · Sha384 · Sha512 · Sha224 · Sha512Truncated224 · Sha512Truncated256 · Sha3_224 · Sha3_256 · Sha3_384 · Sha3_512 · Shake128 · Shake256

FIPS 203 device-key parameter set.

MlKem512 · MlKem768 · MlKem1024

Signing randomness policy. Deterministic signing uses FIPS 204’s zero rnd.

Randomized · Deterministic

oa

Types

1 members

Batched output: x [B, …] and optional y [B, …]. Corresponds to oa::DataLoader::Batch.

Matrix
Option<Matrix>
Source
11 members

Ordered named host columns with one checked row count. let mut frame = oa::DataFrame::new(); frame.set_column("timestamp", oa::Series::I64(vec![0, 1]))?; frame.set_column("close", oa::Series::F64(vec![10.0, 11.0]))?; let last = frame.slice(1..2)?; assert_eq!(last.len(), 1); Unlike the donor, missing columns and unequal lengths are errors. Whole-column replacement is transactional; exclusive mutable slices cannot invalidate lengths.

Source
5 members
6 members
3 members
6 members
8 members
11 members
2 members
6 members
3 members
0 members

Result of a train / validation / test split.

Vec<i64>
Vec<i64>
Vec<i64>
Source
9 members

Enums

Contiguous typed host column. Moving it into a frame does not copy its data.

I64(Vec<i64>) · F32(Vec<f32>) · F64(Vec<f64>)

Borrowed contiguous column; independent of an Engine.

I64(&'a [i64]) · F32(&'a [f32]) · F64(&'a [f64])

Exclusively borrowed column storage for in-place edits without resizing.

I64(&'a mut [i64]) · F32(&'a mut [f32]) · F64(&'a mut [f64])

Unit of exact signed Unix timestamps; negative values precede the epoch.

Seconds · Milliseconds · Microseconds · Nanoseconds

Functions

Stack samples into a leading batch dimension using device-side concatenation. Inputs must be nonempty matrices of rank at most three, with any admitted Matrix dtype (U8, F32, I32, or U32). Labels must be present on every sample or absent on every sample. Each component must have equal shapes, dtypes, and one engine owner. A one-sample batch reuses its Matrix storage through zero-copy views. No default Engine or host readback is used. Errors Returns an error for empty input, inconsistent samples, unsupported rank, allocation failure, or GPU recording failure.

Randomly split indices into train, validation, and test subsets. Matches donor FnDataset::randomSplit: clamp train to [0, 1] and validation to [0, 1 - train], truncate their FP32 counts, and assign the remainder to test. The donor header’s claim that the remainder goes to train contradicts its implementation; this port follows the implementation. Errors Returns an error for a negative size, non-finite ratios, allocation failure, or failure to derive a clock seed when seed is zero.

Fisher-Yates shuffle using the donor’s PCG32 stream and unbiased rejection. A nonzero seed reproduces the C++ oa::Random(seed) permutation. Zero uses the system clock. This generator is for sampling, not cryptography. Errors Returns an error when seed zero cannot be derived from the system clock.

Types

1 members

Batched output: x [B, …] and optional y [B, …]. Corresponds to oa::DataLoader::Batch.

Matrix
Option<Matrix>
Source
11 members

Ordered named host columns with one checked row count. let mut frame = oa::DataFrame::new(); frame.set_column("timestamp", oa::Series::I64(vec![0, 1]))?; frame.set_column("close", oa::Series::F64(vec![10.0, 11.0]))?; let last = frame.slice(1..2)?; assert_eq!(last.len(), 1); Unlike the donor, missing columns and unequal lengths are errors. Whole-column replacement is transactional; exclusive mutable slices cannot invalidate lengths.

Source
5 members
6 members
3 members
6 members
8 members
11 members
2 members
6 members
3 members
0 members

Result of a train / validation / test split.

Vec<i64>
Vec<i64>
Vec<i64>
Source
9 members

Enums

Contiguous typed host column. Moving it into a frame does not copy its data.

I64(Vec<i64>) · F32(Vec<f32>) · F64(Vec<f64>)

Borrowed contiguous column; independent of an Engine.

I64(&'a [i64]) · F32(&'a [f32]) · F64(&'a [f64])

Exclusively borrowed column storage for in-place edits without resizing.

I64(&'a mut [i64]) · F32(&'a mut [f32]) · F64(&'a mut [f64])

Unit of exact signed Unix timestamps; negative values precede the epoch.

Seconds · Milliseconds · Microseconds · Nanoseconds

oa

Types

16 members

Handle-free lifetime and stable-frame evidence for one captured resource. Resource IDs follow deterministic graph-resource order and never expose a Vulkan handle or bindless descriptor. Alias-candidate state records completed liveness, external-output, and storage-owner qualification; physical storage is not shared until a later materialization stage succeeds transactionally.

Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.

method

Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.

method

Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.

method

Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.

method

Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.

method

Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.

method

Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.

method

Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.

method

Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.

method
Source
4 members
3 members
27 members
DeviceHardwareInfo
DeviceSoftwareInfo

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method
Source
3 members
7 members
26 members

Sole owner of OA’s local execution services. The current one-device recorder is thread-affine. Engine intentionally remains neither Send nor Sync until concurrent queue scheduling and submission synchronization are implemented and verified.

List every Vulkan device, including software CPU implementations. Creates a temporary instance but no logical device, allocator or pipelines. A listed device may still fail OA capability admission. Ordinals are scoped to the current loader and ICD configuration, not stable across machines. Errors Returns backend initialization or enumeration errors.

method
Source
9 members
8 members
6 members
11 members
21 members

Engine-associated executable work captured for repeated submission. The captured executable structure is immutable. Read-only Matrix inputs may be rebound to shape- and dtype-identical storage while preserving the graph identity. Replays cache one recorded Vulkan command per binding set, so rotating through a bounded set of input buffers reuses the recorded commands after the first submission of each set.

Source
46 members

Immutable snapshot of execution-plan diagnostics.

Source
42 members

Engine-lifetime counters of fusion decisions, decline reasons and JIT admissions.

Source
7 members
11 members
23 members

Engine-borrowing presentation session. Construction creates and owns the SDL3 Vulkan surface, then records whether the Engine’s retained graphics queue can present to that exact surface. Swapchain acquire/present is intentionally the next lifecycle phase rather than a fabricated method on this real surface session.

Create a presentation session for one SDL3 window. The Engine must have been built using EngineRequirements::presentation() and window.required_instance_extensions().

method

Create a presentation session for one SDL3 window. The Engine must have been built using EngineRequirements::presentation() and window.required_instance_extensions().

method
Source
8 members
5 members
10 members
19 members

Canonical semantic graph, deliberately independent of Vulkan objects.

Source
12 members
19 members

One mathematical or domain operation before executable lowering.

Source
7 members
8 members
5 members
20 members

Handle-free description of one logical value.

Source
7 members
13 members

One named measurement region. A host timer brackets arbitrary host code. A device timer must be initialized against an engine, then one Engine::checkpoint_with_timer records the device timestamps around the submitted batch. The device path is single-flight: a timer cannot tag a new submission while its previous one is still pending.

Source

Enums

Integrated · Discrete · Virtual · Cpu · Other

Policy for selecting the local device owned by an engine.

Automatic · Index(usize)

Position of one compiled specialization contract entry. Donor: oa::ExecutionBindingRole in oacpp/source/cpp/include/oa/runtime/executionPlan.h.

Input · Output

Host clock paired with the Vulkan device timestamp domain. Host timestamps are nanoseconds in the corresponding POSIX clock domain; device timestamps are ticks and must be scaled by device_nanoseconds_per_tick.

Monotonic · MonotonicRaw

Severity threshold and record level for OA diagnostics.

Trace = 0 · Debug = 1 · Info = 2 · Warn = 3 · Error = 4 · Fatal = 5 · Off = 6

Logical access mode derived from an operation contract.

Read · Write · ReadWrite

Clock domain measured by one Timer. Auto resolves to Device on Timer::init and to Host on the first Timer::begin.

Auto · Host · Device

Types

16 members

Handle-free lifetime and stable-frame evidence for one captured resource. Resource IDs follow deterministic graph-resource order and never expose a Vulkan handle or bindless descriptor. Alias-candidate state records completed liveness, external-output, and storage-owner qualification; physical storage is not shared until a later materialization stage succeeds transactionally.

Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.

method

Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.

method

Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.

method

Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.

method

Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.

method

Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.

method

Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.

method

Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.

method

Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.

method
Source
4 members
3 members
27 members
DeviceHardwareInfo
DeviceSoftwareInfo

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method

Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.

method
Source
3 members
7 members
26 members

Sole owner of OA’s local execution services. The current one-device recorder is thread-affine. Engine intentionally remains neither Send nor Sync until concurrent queue scheduling and submission synchronization are implemented and verified.

List every Vulkan device, including software CPU implementations. Creates a temporary instance but no logical device, allocator or pipelines. A listed device may still fail OA capability admission. Ordinals are scoped to the current loader and ICD configuration, not stable across machines. Errors Returns backend initialization or enumeration errors.

method
Source
9 members
8 members
6 members
11 members
21 members

Engine-associated executable work captured for repeated submission. The captured executable structure is immutable. Read-only Matrix inputs may be rebound to shape- and dtype-identical storage while preserving the graph identity. Replays cache one recorded Vulkan command per binding set, so rotating through a bounded set of input buffers reuses the recorded commands after the first submission of each set.

Source
46 members

Immutable snapshot of execution-plan diagnostics.

Source
42 members

Engine-lifetime counters of fusion decisions, decline reasons and JIT admissions.

Source
7 members
11 members
3 members
4 members

Select the valid swapchain extent for one SDL drawable-pixel extent. None means the window is minimized and callers must defer allocation or acquisition until SDL reports a non-zero drawable extent.

method

Select the valid swapchain extent for one SDL drawable-pixel extent. None means the window is minimized and callers must defer allocation or acquisition until SDL reports a non-zero drawable extent.

method
Source
23 members

Engine-borrowing presentation session. Construction creates and owns the SDL3 Vulkan surface, then records whether the Engine’s retained graphics queue can present to that exact surface. Swapchain acquire/present is intentionally the next lifecycle phase rather than a fabricated method on this real surface session.

Create a presentation session for one SDL3 window. The Engine must have been built using EngineRequirements::presentation() and window.required_instance_extensions().

method

Create a presentation session for one SDL3 window. The Engine must have been built using EngineRequirements::presentation() and window.required_instance_extensions().

method
Source
8 members
5 members
10 members
19 members

Canonical semantic graph, deliberately independent of Vulkan objects.

Source
12 members
19 members

One mathematical or domain operation before executable lowering.

Source
7 members
8 members
5 members
20 members

Handle-free description of one logical value.

Source
7 members
13 members

One named measurement region. A host timer brackets arbitrary host code. A device timer must be initialized against an engine, then one Engine::checkpoint_with_timer records the device timestamps around the submitted batch. The device path is single-flight: a timer cannot tag a new submission while its previous one is still pending.

Source

Enums

Integrated · Discrete · Virtual · Cpu · Other

Policy for selecting the local device owned by an engine.

Automatic · Index(usize)

Position of one compiled specialization contract entry. Donor: oa::ExecutionBindingRole in oacpp/source/cpp/include/oa/runtime/executionPlan.h.

Input · Output

Host clock paired with the Vulkan device timestamp domain. Host timestamps are nanoseconds in the corresponding POSIX clock domain; device timestamps are ticks and must be scaled by device_nanoseconds_per_tick.

Monotonic · MonotonicRaw

Severity threshold and record level for OA diagnostics.

Trace = 0 · Debug = 1 · Info = 2 · Warn = 3 · Error = 4 · Fatal = 5 · Off = 6

Logical access mode derived from an operation contract.

Read · Write · ReadWrite

Clock domain measured by one Timer. Auto resolves to Device on Timer::init and to Host on the first Timer::begin.

Auto · Host · Device