Core, data, and cryptography
Core runtime, numerical operations, datasets, and cryptography.
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
Uniform sampled skeletal-animation clip. Stores frame_count * joint_count validated local Transform samples in row-major frame order. Construction is validated through super::create_clip. Donor: oa::AnimClip.
Source10 members
Immutable sparse animation curve over keyframe times. Construction is validated through super::create_curve; keyframe times are strictly increasing and every value and tangent is finite. Donor: oa::AnimCurve<T>.
Source3 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.
Source8 members
Ordered list of Callback objects attached to a session. Callbacks fire in insertion order. This mirrors oa::Iterator::addCallback but is an explicit value rather than a virtual base member so the concrete session type can own it directly.
Source20 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.
34 members
Four-component RGBA color used by UI, plotting, overlays, and ordinary normalized render colors.
7 members
UTC human-readable date/time. For log display and file naming only — never for consensus or deterministic math.
Source28 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.
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)?;
11 members
0 members
Modifier key bitmask (matches donor UiModifier* constants).
Source3 members
Stable per-frame pointer and modifier snapshot. Donor: oa/ui/event.h.
Source3 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.
Source27 members
Locked skeletal-joint transform value. Donor: oa::Joint. Setters that the donor guards with contract aborts return Result here instead.
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>.
Source11 members
Structured JSONL scalar-metrics sink. Thread-safe: log_scalar and flush serialize through an internal mutex. The open flag is an atomic for cheap is_open checks on the hot path.
Source8 members
Read-only whole-file mapping with RAII lifetime. Port provenance: oa::MappedFile.
Source78 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.
45 members
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.
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");
14 members
Rolling-window performance statistics. No GPU dependency; pure CPU value struct.
Source0 members
Result returned by fallible OA operations.
Source2 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");
Source7 members
One validated local-transform sample for a skeleton. Construction is validated through super::create_pose; every joint transform is finite with a normalizable rotation. Donor: oa::SkelPose.
Source10 members
Accumulating stopwatch. ⓘlet mut sw = oa::Stopwatch::new(); sw.start(); // ... work ... sw.stop(); println!("{:.3}ms", sw.elapsed_ms());
Source18 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.
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.
10 members
Global validation controller. Port provenance: oa::Validation.
SourceEnums
Read/write access qualifier for a buffer binding. Port provenance: oa::BufferAccess in oa/core/bufferAccess.h.
Read · Write · ReadWrite
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
Uniform dtype relationship declared by an operation schema.
MatchInput · PromoteFloat · Explicit
Uniform shape relationship declared by an operation schema.
MatchInput · Broadcast · MatMulNt · Explicit
Semantic kind of one operation value.
Matrix · Image · Audio · VideoFrame · QuantMatrix · Texture
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
Uniform sampled skeletal-animation clip. Stores frame_count * joint_count validated local Transform samples in row-major frame order. Construction is validated through super::create_clip. Donor: oa::AnimClip.
Source10 members
Immutable sparse animation curve over keyframe times. Construction is validated through super::create_curve; keyframe times are strictly increasing and every value and tangent is finite. Donor: oa::AnimCurve<T>.
Source10 members
Value type admissible in Keyframe and AnimCurve. Sealed: implemented by f32, Vec3, and Quat. The trait spells the donor’s isAnimCurveValueV bound plus the value behaviors curve sampling requires; it is not a public extension point.
Source27 members
Locked skeletal-joint transform value. Donor: oa::Joint. Setters that the donor guards with contract aborts return Result here instead.
4 members
Per-axis degrees-of-freedom flags. Donor: oa::JointDegreesOfFreedom.
Source4 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.
Source4 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>.
Source7 members
One validated local-transform sample for a skeleton. Construction is validated through super::create_pose; every joint transform is finite with a normalizable rotation. Donor: oa::SkelPose.
SourceEnums
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.
SourceEnums
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)
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.
Source8 members
Ordered list of Callback objects attached to a session. Callbacks fire in insertion order. This mirrors oa::Iterator::addCallback but is an explicit value rather than a virtual base member so the concrete session type can own it directly.
Source20 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.
34 members
Four-component RGBA color used by UI, plotting, overlays, and ordinary normalized render colors.
7 members
UTC human-readable date/time. For log display and file naming only — never for consensus or deterministic math.
Source20 members
Signed nanosecond-precision duration. Stores i64 nanoseconds. Checked constructors return None on overflow instead of the donor’s contract abort.
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.
Source28 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.
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)?;
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.
Source11 members
Structured JSONL scalar-metrics sink. Thread-safe: log_scalar and flush serialize through an internal mutex. The open flag is an atomic for cheap is_open checks on the hot path.
Source8 members
Read-only whole-file mapping with RAII lifetime. Port provenance: oa::MappedFile.
Source78 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.
45 members
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.
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");
14 members
Rolling-window performance statistics. No GPU dependency; pure CPU value struct.
Source0 members
Result returned by fallible OA operations.
Source2 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");
Source10 members
Accumulating stopwatch. ⓘlet mut sw = oa::Stopwatch::new(); sw.start(); // ... work ... sw.stop(); println!("{:.3}ms", sw.elapsed_ms());
Source18 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.
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.
10 members
Global validation controller. Port provenance: oa::Validation.
SourceEnums
Read/write access qualifier for a buffer binding. Port provenance: oa::BufferAccess in oa/core/bufferAccess.h.
Read · Write · ReadWrite
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
Uniform dtype relationship declared by an operation schema.
MatchInput · PromoteFloat · Explicit
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.
Source8 members
Ordered list of Callback objects attached to a session. Callbacks fire in insertion order. This mirrors oa::Iterator::addCallback but is an explicit value rather than a virtual base member so the concrete session type can own it directly.
Source3 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.
SourceTypes
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.
4 members
A named subcommand (or the implicit root command). Options registered on a Cmd are only matched when that subcommand is active. The root Cmd is always active.
Source17 members
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 pub const VIEWPORT_TITLE: &str = "OaViewport";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)?;
Types
11 members
Structured JSONL scalar-metrics sink. Thread-safe: log_scalar and flush serialize through an internal mutex. The open flag is an atomic for cheap is_open checks on the hot path.
SourceTypes
8 members
Read-only whole-file mapping with RAII lifetime. Port provenance: oa::MappedFile.
SourceFunctions
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 two byte slices with ordinary early-exit semantics.
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
pub const AMPLITUDE_TO_DB: OperationContract;Source pub const BIQUAD: OperationContract;Source pub const CLIP: OperationContract;Source pub const FADE: OperationContract;Source pub const GAIN: OperationContract;Source pub const MEL_SPECTROGRAM: OperationContract;Source pub const MFCC: OperationContract;Source pub const MIX: OperationContract;Source pub const NORMALIZE: OperationContract;Source pub const PRE_EMPHASIS: OperationContract;Source pub const RESAMPLE: OperationContract;Source pub const REVERB: OperationContract;Source pub const SATURATE: OperationContract;Source pub const SOS_FILTER: OperationContract;Source pub const STFT: OperationContract;Source pub const TO_MONO: OperationContract;Source pub const WAVEFORM_ENVELOPE: OperationContract;Source Constants & Variables
pub const ADD: OperationContract;Source pub const ADD_MOD: OperationContract;Source pub const ADD_SCALAR: OperationContract;Source pub const BARRETT_MULTIPLY: OperationContract;Source pub const BIT_AND: OperationContract;Source pub const BIT_NOT: OperationContract;Source pub const BIT_OR: OperationContract;Source pub const BIT_XOR: OperationContract;Source pub const COMPARE: OperationContract;Source pub const COMPARE_SCALAR: OperationContract;Source pub const DIV_REM: OperationContract;Source pub const DIV_REM_MIXED: OperationContract;Source pub const DIV_REM_NARROW: OperationContract;Source pub const DIV_REM_SCALAR: OperationContract;Source pub const DIV_REM_WIDE: OperationContract;Source pub const FROM_MONTGOMERY: OperationContract;Source pub const FROM_U32: OperationContract;Source pub const FROM_U64: OperationContract;Source pub const INVERSE_MOD: OperationContract;Source pub const LEADING_ZEROS: OperationContract;Source pub const MONTGOMERY_MULTIPLY: OperationContract;Source pub const MULTIPLY_HIGH: OperationContract;Source pub const MULTIPLY_LOW: OperationContract;Source pub const MULTIPLY_MOD: OperationContract;Source pub const MULTIPLY_SCALAR: OperationContract;Source pub const MULTIPLY_WIDE: OperationContract;Source pub const POW_MOD: OperationContract;Source pub const REDUCE_BARRETT: OperationContract;Source pub const REDUCE_MOD: OperationContract;Source pub const REDUCE_MONTGOMERY: OperationContract;Source pub const SETUP_BARRETT: OperationContract;Source pub const SHIFT_LEFT: OperationContract;Source pub const SHIFT_RIGHT: OperationContract;Source pub const SQUARE_MOD: OperationContract;Source pub const SQUARE_WIDE: OperationContract;Source pub const SUBTRACT: OperationContract;Source pub const SUBTRACT_MOD: OperationContract;Source pub const SUBTRACT_SCALAR: OperationContract;Source pub const TO_MONTGOMERY: OperationContract;Source pub const TO_U32: OperationContract;Source pub const TO_U64: OperationContract;Source Constants & Variables
pub const KECCAK_F1600: OperationContract;Source pub const MERKLE_PROOFS: OperationContract;Source pub const MERKLE_ROOT: OperationContract;Source pub const POSEIDON2_BABYBEAR16: OperationContract;Source pub const POSEIDON2_BABYBEAR16_PERMUTE: OperationContract;Source pub const POSEIDON2_BABYBEAR24: OperationContract;Source pub const POSEIDON2_BABYBEAR24_PERMUTE: OperationContract;Source pub const POSEIDON2_KOALABEAR16: OperationContract;Source pub const POSEIDON2_KOALABEAR16_PERMUTE: OperationContract;Source pub const POSEIDON2_KOALABEAR24: OperationContract;Source pub const POSEIDON2_KOALABEAR24_PERMUTE: OperationContract;Source pub const SHA224: OperationContract;Source pub const SHA256: OperationContract;Source pub const SHA384: OperationContract;Source pub const SHA3_224: OperationContract;Source pub const SHA3_256: OperationContract;Source pub const SHA3_384: OperationContract;Source pub const SHA3_512: OperationContract;Source pub const SHA512: OperationContract;Source pub const SHA512_224: OperationContract;Source pub const SHA512_256: OperationContract;Source pub const SHAKE128: OperationContract;Source pub const SHAKE256: OperationContract;Source pub const VERIFY_MERKLE_PROOFS: OperationContract;Source Constants & Variables
Constants & Variables
Constants & Variables
pub const ML_DSA_44_VERIFY_BATCH: OperationContract;Source pub const ML_DSA_44_VERIFY_HASH_MESSAGE_BATCH: OperationContract;Source pub const ML_DSA_44_VERIFY_PREHASHED_BATCH: OperationContract;Source pub const ML_DSA_65_VERIFY_BATCH: OperationContract;Source pub const ML_DSA_65_VERIFY_HASH_MESSAGE_BATCH: OperationContract;Source pub const ML_DSA_65_VERIFY_PREHASHED_BATCH: OperationContract;Source pub const ML_DSA_87_VERIFY_BATCH: OperationContract;Source pub const ML_DSA_87_VERIFY_HASH_MESSAGE_BATCH: OperationContract;Source pub const ML_DSA_87_VERIFY_PREHASHED_BATCH: OperationContract;Source Constants & Variables
pub const ADAPTIVE_THRESHOLD_GAUSSIAN: OperationContract;Source pub const ADAPTIVE_THRESHOLD_MEAN: OperationContract;Source pub const ALPHA_BLEND: OperationContract;Source pub const AVERAGE_BLUR: OperationContract;Source pub const BILATERAL_FILTER: OperationContract;Source pub const BRIGHTNESS_CONTRAST: OperationContract;Source pub const CENTER_CROP: OperationContract;Source pub const CHANNEL_REORDER: OperationContract;Source pub const CLAMP: OperationContract;Source pub const COLOR_TWIST: OperationContract;Source pub const COMPOSITE: OperationContract;Source pub const CONVERT_COLOR: OperationContract;Source pub const CONVOLVE_2D: OperationContract;Source pub const CROP: OperationContract;Source pub const DILATE: OperationContract;Source pub const ERASE: OperationContract;Source pub const ERODE: OperationContract;Source pub const FLIP: OperationContract;Source pub const GAMMA_CONTRAST: OperationContract;Source pub const GAUSSIAN_BLUR: OperationContract;Source pub const GAUSSIAN_NOISE: OperationContract;Source pub const GRAYSCALE: OperationContract;Source pub const INVERT: OperationContract;Source pub const IN_RANGE: OperationContract;Source pub const LAPLACIAN: OperationContract;Source pub const MEDIAN_BLUR: OperationContract;Source pub const MORPHOLOGY_BLACK_HAT: OperationContract;Source pub const MORPHOLOGY_CLOSE: OperationContract;Source pub const MORPHOLOGY_GRADIENT: OperationContract;Source pub const MORPHOLOGY_OPEN: OperationContract;Source pub const MORPHOLOGY_TOP_HAT: OperationContract;Source pub const NORMALIZE: OperationContract;Source pub const PAD: OperationContract;Source pub const POSTERIZE: OperationContract;Source pub const REMAP: OperationContract;Source pub const RESIZE: OperationContract;Source pub const RESIZE_NORMALIZE: OperationContract;Source pub const ROTATE: OperationContract;Source pub const SALT_PEPPER_NOISE: OperationContract;Source pub const SCHARR: OperationContract;Source pub const SEGMENTATION_OVERLAY: OperationContract;Source pub const SEPARABLE_CONVOLVE_2D: OperationContract;Source pub const SHARPEN: OperationContract;Source pub const SOBEL: OperationContract;Source pub const SOLARIZE: OperationContract;Source pub const THRESHOLD_BINARY: OperationContract;Source pub const THRESHOLD_BINARY_INV: OperationContract;Source pub const THRESHOLD_TO_ZERO: OperationContract;Source pub const THRESHOLD_TO_ZERO_INV: OperationContract;Source pub const THRESHOLD_TRUNCATE: OperationContract;Source pub const UNSHARP_MASK: OperationContract;Source pub const WARP_AFFINE: OperationContract;Source pub const WARP_PERSPECTIVE: OperationContract;Source Constants & Variables
pub const ABS: OperationContract;Source pub const ADD: OperationContract;Source pub const ADD_SCALAR: OperationContract;Source pub const ARGMAX: OperationContract;Source pub const BIAS_ADD: OperationContract;Source pub const CATEGORICAL_ACCURACY_COUNT: OperationContract;Source pub const CAUSAL_MASK: OperationContract;Source pub const CAUSAL_MASK_BACKWARD: OperationContract;Source pub const CLAMP_MAX: OperationContract;Source pub const CLAMP_MIN: OperationContract;Source pub const COMPACT_ROWS: OperationContract;Source pub const COMPACT_ROWS_BACKWARD: OperationContract;Source pub const CONCAT: OperationContract;Source pub const COPY: OperationContract;Source pub const COS: OperationContract;Source pub const DIV: OperationContract;Source pub const DIV_SCALAR: OperationContract;Source pub const DROPOUT: OperationContract;Source pub const DROPOUT_BACKWARD: OperationContract;Source pub const EQUAL: OperationContract;Source pub const EXP: OperationContract;Source pub const GATHER: OperationContract;Source pub const GATHER_BACKWARD: OperationContract;Source pub const GATHER_LAST_DIM: OperationContract;Source pub const GATHER_LAST_DIM_BACKWARD: OperationContract;Source pub const GREATER_EQUAL: OperationContract;Source pub const LOG: OperationContract;Source pub const LOG_SOFTMAX: OperationContract;Source pub const LOG_SOFTMAX_BACKWARD: OperationContract;Source pub const MASKED_CATEGORICAL_ACCURACY_COUNT: OperationContract;Source pub const MAT_MUL_NT: OperationContract;Source pub const MAX: OperationContract;Source pub const MAX_BACKWARD: OperationContract;Source pub const MEAN: OperationContract;Source pub const MOE_EXPERT_PLAN: OperationContract;Source pub const MOE_ROUTING_BIAS_UPDATE: OperationContract;Source pub const MUL: OperationContract;Source pub const NEG: OperationContract;Source pub const PHILOX_NORMAL: OperationContract;Source pub const PHILOX_REPLAY_ADVANCE: OperationContract;Source pub const PHILOX_UNIFORM: OperationContract;Source pub const POW: OperationContract;Source pub const RECIPROCAL: OperationContract;Source pub const REPEAT_INTERLEAVE: OperationContract;Source pub const REPEAT_INTERLEAVE_BACKWARD: OperationContract;Source pub const SAMPLE_LOGITS: OperationContract;Source pub const SCALE: OperationContract;Source pub const SCATTER_ROWS: OperationContract;Source pub const SCATTER_ROWS_BACKWARD_SOURCE: OperationContract;Source pub const SIN: OperationContract;Source pub const SLICE: OperationContract;Source pub const SLICE_BACKWARD: OperationContract;Source pub const SOFTMAX: OperationContract;Source pub const SOFTMAX_BACKWARD: OperationContract;Source pub const SPLIT: OperationContract;Source pub const SQRT: OperationContract;Source pub const SUB: OperationContract;Source pub const SUB_SCALAR: OperationContract;Source pub const SUM: OperationContract;Source pub const SUM_BACKWARD: OperationContract;Source pub const TOP_K: OperationContract;Source pub const TOP_K_MASK: OperationContract;Source pub const TRANSPOSE: OperationContract;Source Constants & Variables
pub const ADAM: OperationContract;Source pub const ADAMW: OperationContract;Source pub const ADAMW_GRAPH: OperationContract;Source pub const ADAMW_GRAPH_ADVANCE: OperationContract;Source pub const ADAPTIVE_AVG_POOL_2D: OperationContract;Source pub const ADAPTIVE_AVG_POOL_2D_BACKWARD: OperationContract;Source pub const APPEND: OperationContract;Source pub const APPEND_BATCH: OperationContract;Source pub const APPEND_CURSOR: OperationContract;Source pub const AVG_POOL_2D: OperationContract;Source pub const AVG_POOL_2D_BACKWARD: OperationContract;Source pub const BATCH_NORM_2D: OperationContract;Source pub const BATCH_NORM_2D_BACKWARD: OperationContract;Source pub const BATCH_NORM_2D_RUNNING_UPDATE: OperationContract;Source pub const BATCH_NORM_2D_WITH_STATS: OperationContract;Source pub const BCE: OperationContract;Source pub const BCE_BACKWARD: OperationContract;Source pub const BMM: OperationContract;Source pub const BMM_NT: OperationContract;Source pub const BMM_TN: OperationContract;Source pub const CAUSAL_LINEAR_ATTENTION: OperationContract;Source pub const CAUSAL_LINEAR_ATTENTION_BACKWARD: OperationContract;Source pub const CHANNEL_NORM: OperationContract;Source pub const CHANNEL_NORM_BACKWARD: OperationContract;Source pub const CHANNEL_NORM_RELU: OperationContract;Source pub const CHANNEL_NORM_RELU_BACKWARD: OperationContract;Source pub const CLIP_GRAD_NORM: OperationContract;Source pub const CLIP_REWARD: OperationContract;Source pub const COMPUTE_SCALE_Q4: OperationContract;Source pub const COMPUTE_SCALE_Q8: OperationContract;Source pub const CONV_1D: OperationContract;Source pub const CONV_1D_BACKWARD: OperationContract;Source pub const CONV_2D: OperationContract;Source pub const CONV_2D_BACKWARD: OperationContract;Source pub const CONV_TRANSPOSE_1D: OperationContract;Source pub const CONV_TRANSPOSE_1D_BACKWARD: OperationContract;Source pub const CONV_TRANSPOSE_2D: OperationContract;Source pub const CONV_TRANSPOSE_2D_BACKWARD: OperationContract;Source pub const CROSS_ENTROPY: OperationContract;Source pub const CROSS_ENTROPY_BACKWARD: OperationContract;Source pub const DEQUANTIZE: OperationContract;Source pub const DEQUANTIZE_Q4: OperationContract;Source pub const DEQUANTIZE_Q8: OperationContract;Source pub const DQN: OperationContract;Source pub const ELU: OperationContract;Source pub const ELU_BACKWARD: OperationContract;Source pub const EMBEDDING: OperationContract;Source pub const EMBEDDING_BACKWARD: OperationContract;Source pub const EULER_STEP: OperationContract;Source pub const EVALUATE_CATEGORICAL: OperationContract;Source pub const EVALUATE_TANH_NORMAL: OperationContract;Source pub const GAE: OperationContract;Source pub const GELU: OperationContract;Source pub const GELU_BACKWARD: OperationContract;Source pub const GROUPED_GEMM_M: OperationContract;Source pub const GROUPED_GEMM_M_BACKWARD: OperationContract;Source pub const GROUPED_LINEAR_M: OperationContract;Source pub const GROUPED_LINEAR_M_BACKWARD: OperationContract;Source pub const GRU_CELL: OperationContract;Source pub const GRU_CELL_BACKWARD: OperationContract;Source pub const GRU_SCAN: OperationContract;Source pub const GRU_SCAN_BACKWARD: OperationContract;Source pub const L1: OperationContract;Source pub const L1_BACKWARD: OperationContract;Source pub const LAYER_NORM: OperationContract;Source pub const LAYER_NORM_BACKWARD: OperationContract;Source pub const LEAKY_RELU: OperationContract;Source pub const LEAKY_RELU_BACKWARD: OperationContract;Source pub const LINEAR: OperationContract;Source pub const LINEAR_BACKWARD: OperationContract;Source pub const LINEAR_MATCH: OperationContract;Source pub const LINEAR_PARAMETER_BACKWARD: OperationContract;Source pub const MAMBA3_MIMO: OperationContract;Source pub const MAMBA3_MIMO_BACKWARD: OperationContract;Source pub const MAMBA3_MIMO_STEP: OperationContract;Source pub const MAMBA3_PREPROCESS: OperationContract;Source pub const MAMBA3_PREPROCESS_BACKWARD: OperationContract;Source pub const MAMBA3_SISO: OperationContract;Source pub const MAMBA3_SISO_BACKWARD: OperationContract;Source pub const MAMBA3_SISO_STEP: OperationContract;Source pub const MASKED_CROSS_ENTROPY: OperationContract;Source pub const MASKED_CROSS_ENTROPY_BACKWARD: OperationContract;Source pub const MASKED_MSE: OperationContract;Source pub const MASKED_MSE_BACKWARD: OperationContract;Source pub const MAT_MUL_NT_Q4: OperationContract;Source pub const MAT_MUL_NT_Q8: OperationContract;Source pub const MAT_MUL_NT_QUANTIZED: OperationContract;Source pub const MAX_POOL_2D: OperationContract;Source pub const MAX_POOL_2D_BACKWARD: OperationContract;Source pub const MERGE_HEADS: OperationContract;Source pub const MINIBATCH: OperationContract;Source pub const MINIBATCH_CURSOR: OperationContract;Source pub const MISH: OperationContract;Source pub const MISH_BACKWARD: OperationContract;Source pub const MOE_COMBINE: OperationContract;Source pub const MOE_COMBINE_BACKWARD: OperationContract;Source pub const MOE_GATHER: OperationContract;Source pub const MOE_GATHER_BACKWARD: OperationContract;Source pub const MOE_ROUTE_WEIGHTS: OperationContract;Source pub const MOE_ROUTE_WEIGHTS_BACKWARD: OperationContract;Source pub const MSE: OperationContract;Source pub const MSE_BACKWARD: OperationContract;Source pub const MUON: OperationContract;Source pub const NEXT_OBSERVATION_APPEND: OperationContract;Source pub const NORMALIZE: OperationContract;Source pub const NORMALIZE_OBSERVATION: OperationContract;Source pub const PPO: OperationContract;Source pub const PPO_CLIPPED_POLICY: OperationContract;Source pub const PPO_CLIPPED_POLICY_BACKWARD: OperationContract;Source pub const QUANTIZE: OperationContract;Source pub const QUANTIZE_Q4: OperationContract;Source pub const QUANTIZE_Q8: OperationContract;Source pub const RELU: OperationContract;Source pub const RELU_BACKWARD: OperationContract;Source pub const RESET: OperationContract;Source pub const RMS_NORM: OperationContract;Source pub const RMS_NORM_BACKWARD: OperationContract;Source pub const RMS_NORM_GATED: OperationContract;Source pub const RMS_NORM_GATED_BACKWARD: OperationContract;Source pub const RNN_CELL: OperationContract;Source pub const RNN_CELL_BACKWARD: OperationContract;Source pub const RNN_SCAN: OperationContract;Source pub const RNN_SCAN_BACKWARD: OperationContract;Source pub const ROPE: OperationContract;Source pub const ROPE_BACKWARD: OperationContract;Source pub const SAC_ACTOR: OperationContract;Source pub const SAC_CRITIC: OperationContract;Source pub const SAMPLE: OperationContract;Source pub const SAMPLE_CATEGORICAL: OperationContract;Source pub const SAMPLE_CATEGORICAL_CURSOR: OperationContract;Source pub const SAMPLE_TANH_NORMAL: OperationContract;Source pub const SCALED_DOT_PRODUCT_ATTENTION: OperationContract;Source pub const SCALED_DOT_PRODUCT_ATTENTION_BACKWARD: OperationContract;Source pub const SCALE_ACTION: OperationContract;Source pub const SGD: OperationContract;Source pub const SGD_MOMENTUM: OperationContract;Source pub const SIGMOID: OperationContract;Source pub const SIGMOID_BACKWARD: OperationContract;Source pub const SILU: OperationContract;Source pub const SILU_BACKWARD: OperationContract;Source pub const SILU_MUL: OperationContract;Source pub const SILU_MUL_BACKWARD: OperationContract;Source pub const SMOOTH_L1: OperationContract;Source pub const SMOOTH_L1_BACKWARD: OperationContract;Source pub const SOFTMAX_SCALED_MASKED: OperationContract;Source pub const SOFTMAX_SCALED_MASKED_BACKWARD: OperationContract;Source pub const SOFTPLUS: OperationContract;Source pub const SOFTPLUS_BACKWARD: OperationContract;Source pub const SPLIT_HEADS: OperationContract;Source pub const SWIGLU: OperationContract;Source pub const SWIGLU_BACKWARD: OperationContract;Source pub const TANH: OperationContract;Source pub const TANH_BACKWARD: OperationContract;Source pub const TRADING_CURSOR_ADVANCE: OperationContract;Source pub const TRADING_RESET: OperationContract;Source pub const TRADING_RESET_CURSOR: OperationContract;Source pub const TRADING_STEP: OperationContract;Source pub const TRADING_STEP_CURSOR: OperationContract;Source pub const TRAINING_ACCUMULATE: OperationContract;Source pub const UPSAMPLE_2D: OperationContract;Source pub const UPSAMPLE_2D_BACKWARD: OperationContract;Source pub const VQ_ASSIGN: OperationContract;Source pub const VQ_EMA_UPDATE: OperationContract;Source pub const VQ_LOOKUP: OperationContract;Source 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");
Types
14 members
Rolling-window performance statistics. No GPU dependency; pure CPU value struct.
SourceTypes
7 members
UTC human-readable date/time. For log display and file naming only — never for consensus or deterministic math.
Source2 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");
Source10 members
Accumulating stopwatch. ⓘlet mut sw = oa::Stopwatch::new(); sw.start(); // ... work ... sw.stop(); println!("{:.3}ms", sw.elapsed_ms());
Source18 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.
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.
Types
10 members
Global validation controller. Port provenance: oa::Validation.
Source0 members
Optional custom callback type for validation messages.
SourceEnums
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).
Return whether button is currently held.
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.
Access the current keyboard held-state snapshot.
Access the current pointer-state snapshot.
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.
Reset all input snapshots.
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
0 members
Modifier key bitmask (matches donor UiModifier* constants).
Source3 members
Stable per-frame pointer and modifier snapshot. Donor: oa/ui/event.h.
Source13 members
1 members
One named action: trigger, focus context, repeat policy, and callback. Donor: oa::KeyAction.
Source5 members
One key-plus-modifiers trigger. Donor: oa::KeyBinding.
Source4 members
Per-frame keyboard held-state snapshot, indexed by SDL scancode. Donor: oa::input::KeyboardState.
Source3 members
Per-frame pointer-state snapshot. Donor: oa::input::MouseState.
SourceEnums
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
Classified scroll gesture — maps to donor UiScrollGesture.
None · MouseWheel · TouchpadPan · PinchScroll
Constants & Variables
pub const GAMEPAD_AXIS_LEFT_TRIGGER: i32 = 4;Source pub const GAMEPAD_AXIS_LEFT_X: i32 = 0;Source pub const GAMEPAD_AXIS_LEFT_Y: i32 = 1;Source pub const GAMEPAD_AXIS_RIGHT_TRIGGER: i32 = 5;Source pub const GAMEPAD_AXIS_RIGHT_X: i32 = 2;Source pub const GAMEPAD_AXIS_RIGHT_Y: i32 = 3;Source pub const GAMEPAD_BUTTON_BACK: i32 = 4;Source pub const GAMEPAD_BUTTON_DPAD_DOWN: i32 = 12;Source pub const GAMEPAD_BUTTON_DPAD_LEFT: i32 = 13;Source pub const GAMEPAD_BUTTON_DPAD_RIGHT: i32 = 14;Source pub const GAMEPAD_BUTTON_DPAD_UP: i32 = 11;Source pub const GAMEPAD_BUTTON_EAST: i32 = 1;Source pub const GAMEPAD_BUTTON_GUIDE: i32 = 5;Source pub const GAMEPAD_BUTTON_LEFT_SHOULDER: i32 = 9;Source pub const GAMEPAD_BUTTON_LEFT_STICK: i32 = 7;Source pub const GAMEPAD_BUTTON_NORTH: i32 = 3;Source pub const GAMEPAD_BUTTON_RIGHT_SHOULDER: i32 = 10;Source pub const GAMEPAD_BUTTON_RIGHT_STICK: i32 = 8;Source pub const GAMEPAD_BUTTON_SOUTH: i32 = 0;Source pub const GAMEPAD_BUTTON_START: i32 = 6;Source pub const GAMEPAD_BUTTON_WEST: i32 = 2;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 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
0 members
Modifier key bitmask (matches donor UiModifier* constants).
SourceEnums
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
Classified scroll gesture — maps to donor UiScrollGesture.
None · MouseWheel · TouchpadPan · PinchScroll
Constants & Variables
Types
11 members
0 members
Modifier key bitmask (matches donor UiModifier* constants).
Source3 members
Stable per-frame pointer and modifier snapshot. Donor: oa/ui/event.h.
SourceEnums
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
Classified scroll gesture — maps to donor UiScrollGesture.
None · MouseWheel · TouchpadPan · PinchScroll
Constants & Variables
pub const GAMEPAD_AXIS_LEFT_TRIGGER: i32 = 4;Source pub const GAMEPAD_AXIS_LEFT_X: i32 = 0;Source pub const GAMEPAD_AXIS_LEFT_Y: i32 = 1;Source pub const GAMEPAD_AXIS_RIGHT_TRIGGER: i32 = 5;Source pub const GAMEPAD_AXIS_RIGHT_X: i32 = 2;Source pub const GAMEPAD_AXIS_RIGHT_Y: i32 = 3;Source pub const GAMEPAD_BUTTON_BACK: i32 = 4;Source pub const GAMEPAD_BUTTON_DPAD_DOWN: i32 = 12;Source pub const GAMEPAD_BUTTON_DPAD_LEFT: i32 = 13;Source pub const GAMEPAD_BUTTON_DPAD_RIGHT: i32 = 14;Source pub const GAMEPAD_BUTTON_DPAD_UP: i32 = 11;Source pub const GAMEPAD_BUTTON_EAST: i32 = 1;Source pub const GAMEPAD_BUTTON_GUIDE: i32 = 5;Source pub const GAMEPAD_BUTTON_LEFT_SHOULDER: i32 = 9;Source pub const GAMEPAD_BUTTON_LEFT_STICK: i32 = 7;Source pub const GAMEPAD_BUTTON_NORTH: i32 = 3;Source pub const GAMEPAD_BUTTON_RIGHT_SHOULDER: i32 = 10;Source pub const GAMEPAD_BUTTON_RIGHT_STICK: i32 = 8;Source pub const GAMEPAD_BUTTON_SOUTH: i32 = 0;Source pub const GAMEPAD_BUTTON_START: i32 = 6;Source pub const GAMEPAD_BUTTON_WEST: i32 = 2;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 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 on a particular engine. Errors Returns an error when 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.
Source78 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.
0 members
Device-resident stable dropless route plan returned by moe_expert_plan.
SourceFunctions
Converts Cartesian coordinates to (yaw, pitch, radius).
Converts spherical (yaw, pitch, radius) coordinates to Cartesian space.
Types
4 members
Translation, rotation, signed scale, row-basis shear, and reflection.
Source0 members
0 members
0 members
0 members
0 members
0 members
0 members
0 members
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.
30 members
53 members
46 members
4 members
Translation, rotation, signed scale, and reflection extracted from a strict TRS matrix.
Source32 members
47 members
33 members
7 members
A top-origin viewport with Vulkan [0, 1] depth.
SourceEnums
Constants & Variables
oa
Types
14 members
A fixed 32-byte SHAKE-256 digest.
Source1 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.
Source10 members
A non-owning mutable byte range that is securely erased when reset or dropped. Linux page locking is best effort and observable through Self::is_locked. The borrow guarantees that the backing range remains alive for this guard.
SourceFunctions
Build a materialized Merkle tree.
Compute the canonical 32-byte SHAKE-256 digest.
Combine two Merkle nodes as SHAKE-256(left || right).
Apply the 24-round Keccak-f[1600] permutation in place.
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.
Produce SHAKE-128 output of exactly output.len() bytes.
Produce SHAKE-256 output of exactly output.len() bytes.
Verify one Merkle inclusion proof against root.
Types
14 members
A fixed 32-byte SHAKE-256 digest.
Source10 members
A non-owning mutable byte range that is securely erased when reset or dropped. Linux page locking is best effort and observable through Self::is_locked. The borrow guarantees that the backing range remains alive for this guard.
SourceFunctions
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.
SourceFunctions
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
4 members
Device-resident immutable tree levels over supplied, already hashed leaves. Odd levels duplicate their last node. No host tree or digest copies are made.
SourceEnums
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
8 members
2 members
Reusable device twiddles and checked public field metadata. This value retains its originating Engine through its Matrix allocations. It has no independent execution owner and exposes no mutable twiddle storage.
SourceEnums
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.
Sign an arbitrary message with ML-DSA-65.
Sign a canonical OA hash with ML-DSA-65.
Verify an ML-DSA-65 message signature. Malformed encodings fail closed.
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.
Verify an ML-DSA-65 signature over a canonical OA hash.
Types
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.
SourceEnums
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
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.
Hash and sign original public U8 message bytes on device (HashML-DSA). Errors Rejects dtype/ownership/alias/context errors, capture, or execution failure.
Sign an exact-length public digest with FIPS HashML-DSA OID framing. Errors Rejects digest/context metadata, owner/alias mismatch, capture, or execution errors.
Verify HashML-DSA original-message batches with a typed hash identity. Errors Rejects incompatible metadata; malformed signature rows produce zero status.
Verify precomputed-digest batches with exact typed FIPS hash extents. Errors Rejects incompatible metadata; invalid digest/signature rows produce zero.
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.
Encapsulate to a public U8 key. Canonicality is checked on device. Errors Rejects key dtype/owner/extent, capture, entropy, or execution errors.
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.
Types
0 members
Opaque decapsulation result. Correct-size malformed ciphertexts follow implicit rejection entirely on device; no validity flag is exposed.
Source0 members
Public derivation outcome. derived is the only public value produced from the opaque shared secret inside the keyed-hash boundary.
Source0 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.
Source2 members
Exact completion of explicit secret or transient-workspace erasure. Dropping the ticket neither waits nor cancels the retained command.
Source4 members
Unique retained ML-DSA key. No mapping, serialization, Clone, or Debug. Abandonment quarantines its secret allocation; use consuming erase.
Source4 members
Unique retained ML-KEM decapsulation key; secret bytes never enter Matrix.
Source0 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.
Source2 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.
SourceEnums
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
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.
Source11 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.
Source5 members
Borrowed row interval over a frame. Columns retain their original buffers.
Source6 members
Stateful batch iterator over a borrowed Dataset. Corresponds to oa::DataLoader.
Source6 members
Object-safe dataset contract: indexed access and a total count. Corresponds to the C++ pure-virtual oa::Dataset base class.
Source8 members
Engine-borrowing adapter for the existing Dataset/DataLoader contract. Host windows borrow columns. get_sample packs row-major FP32 [lookback, 5] input and horizon future-close labels and uploads each once. Timestamps remain metadata, never float features. No normalization or readback occurs. Host windowing is zero-copy; packing and device upload are explicit copies.
Source11 members
Validated borrowed candles. Prices and volume accept F32 or F64 columns; timestamps are I64. Source columns remain immutable while this view exists.
Source2 members
Window shape; targets are the immediately following future close prices.
Source6 members
Host-only borrowed sliding windows. Construct separately within each split.
Source3 members
Multi-tensor sample: input x and optional label y. Corresponds to oa::Dataset::Sample.
Source9 members
Zero-copy indexed view returned by Dataset::subset. Used for train/val/test splits, subsampling, and index filtering. get_item(i) forwards to parent.get_item(indices[i]) without copying data. Corresponds to oa::DsSubset.
SourceEnums
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.
Source11 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.
Source5 members
Borrowed row interval over a frame. Columns retain their original buffers.
Source6 members
Stateful batch iterator over a borrowed Dataset. Corresponds to oa::DataLoader.
Source6 members
Object-safe dataset contract: indexed access and a total count. Corresponds to the C++ pure-virtual oa::Dataset base class.
Source8 members
Engine-borrowing adapter for the existing Dataset/DataLoader contract. Host windows borrow columns. get_sample packs row-major FP32 [lookback, 5] input and horizon future-close labels and uploads each once. Timestamps remain metadata, never float features. No normalization or readback occurs. Host windowing is zero-copy; packing and device upload are explicit copies.
Source11 members
Validated borrowed candles. Prices and volume accept F32 or F64 columns; timestamps are I64. Source columns remain immutable while this view exists.
Source2 members
Window shape; targets are the immediately following future close prices.
Source6 members
Host-only borrowed sliding windows. Construct separately within each split.
Source3 members
Multi-tensor sample: input x and optional label y. Corresponds to oa::Dataset::Sample.
Source9 members
Zero-copy indexed view returned by Dataset::subset. Used for train/val/test splits, subsampling, and index filtering. get_item(i) forwards to parent.get_item(indices[i]) without copying data. Corresponds to oa::DsSubset.
SourceEnums
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.
Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.
Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.
Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.
Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.
Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.
Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.
Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.
4 members
One quasi-simultaneous host/device clock sample. maximum_deviation_nanoseconds is the Vulkan implementation’s uncertainty bound for the pair, not an OA estimate. Consumers should recalibrate long-running traces periodically.
Source3 members
27 members
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
3 members
7 members
Discovery-only identity for an enumerated Vulkan device. Includes software and unsupported devices. Discovery creates no logical device or pipelines and does not imply OA admission. Indices belong to the current loader/ICD enumeration; they are not persistent device identities.
Source26 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.
Examples
9 members
Configuration used to construct one OA execution engine.
Source8 members
6 members
Exact completion point for work submitted to an OA engine. Dropping an event never waits. The originating engine’s retirement service keeps submitted resources and their Vulkan device alive through completion.
Source11 members
Handle-free boundary contract for one exact compiled specialization. A binding describes selection/validation only: plans retain their captured resources and validation never rebinds them. Rust matrices are dense, so a specialization candidate’s implied strides are its dense strides. Donor: oa::ExecutionBindingDesc.
Source21 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.
46 members
42 members
7 members
Compact one-to-four-character diagnostic component tag.
Source11 members
Configuration for the logging session owned by an Engine.
Source23 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().
8 members
SDL3-owned Vulkan-capable window and input/event source.
Source5 members
Proven storage alias from one fresh semantic output version to its input.
Source10 members
Provenance between one forward output and its autograd tape expansion.
Source19 members
12 members
Deterministic many-to-many provenance summary for semantic lowering.
Source19 members
7 members
Canonical graph-local identity of one semantic operation.
Source8 members
Deterministic bridge from one semantic value to a captured resource.
Source20 members
7 members
Canonical graph-local identity of one semantic value.
Source13 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.
SourceEnums
Integrated · Discrete · Virtual · Cpu · Other
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
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.
Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.
Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.
Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.
Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.
Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.
Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.
Return whether a semantic input, replay input, or observed output keeps this resource externally live across plan execution.
4 members
One quasi-simultaneous host/device clock sample. maximum_deviation_nanoseconds is the Vulkan implementation’s uncertainty bound for the pair, not an OA estimate. Consumers should recalibrate long-running traces periodically.
Source3 members
27 members
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
Stable hash of device and driver UUIDs, limits, and queried capabilities. Live memory budget and usage are deliberately excluded.
3 members
7 members
Discovery-only identity for an enumerated Vulkan device. Includes software and unsupported devices. Discovery creates no logical device or pipelines and does not imply OA admission. Indices belong to the current loader/ICD enumeration; they are not persistent device identities.
Source26 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.
Examples
9 members
Configuration used to construct one OA execution engine.
Source8 members
6 members
Exact completion point for work submitted to an OA engine. Dropping an event never waits. The originating engine’s retirement service keeps submitted resources and their Vulkan device alive through completion.
Source11 members
Handle-free boundary contract for one exact compiled specialization. A binding describes selection/validation only: plans retain their captured resources and validation never rebinds them. Rust matrices are dense, so a specialization candidate’s implied strides are its dense strides. Donor: oa::ExecutionBindingDesc.
Source21 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.
46 members
42 members
7 members
Compact one-to-four-character diagnostic component tag.
Source11 members
Configuration for the logging session owned by an Engine.
Source4 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.
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().
8 members
SDL3-owned Vulkan-capable window and input/event source.
Source5 members
Proven storage alias from one fresh semantic output version to its input.
Source10 members
Provenance between one forward output and its autograd tape expansion.
Source19 members
12 members
Deterministic many-to-many provenance summary for semantic lowering.
Source19 members
7 members
Canonical graph-local identity of one semantic operation.
Source8 members
Deterministic bridge from one semantic value to a captured resource.
Source20 members
7 members
Canonical graph-local identity of one semantic value.
Source13 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.
SourceEnums
Integrated · Discrete · Virtual · Cpu · Other
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
Clock domain measured by one Timer. Auto resolves to Device on Timer::init and to Host on the first Timer::begin.
Auto · Host · Device