Expand description
Debug validation layer for OA compute operations.
Port provenance: oa/core/validation.h.
§Build model
| Build | Behaviour |
|---|---|
debug_assertions on (dev) | oa_validate! always active; counters compiled in |
debug_assertions off (release) | oa_validate! compiled out — zero binary size |
release + OA_ENABLE_VALIDATION feature | oa_validate! compiled in, runtime-gated by Validation::is_enabled() |
§Usage
ⓘ
use oa::{oa_validate, ValidationSeverity};
fn my_op(m: usize) -> oa::Result<()> {
oa_validate!(m > 0, ValidationSeverity::Error, "my_op: M must be > 0, got {m}");
Ok(())
}Structs§
- Validation
- Global validation controller.
Enums§
- Validation
Severity - Severity levels for validation messages.
Type Aliases§
- Validation
Callback - Optional custom callback type for validation messages.