tensorlogic_oxicuda_rng/error.rs
1//! Error types for the tensorlogic-oxicuda-rng crate.
2
3/// Errors that can arise from RNG operations.
4#[derive(Debug, thiserror::Error)]
5pub enum RngError {
6 /// The output buffer was empty; nothing to fill.
7 #[error("empty output buffer")]
8 EmptyBuffer,
9
10 /// A caller-supplied parameter was invalid (e.g. negative std-dev, p outside \[0,1\]).
11 #[error("invalid parameter: {0}")]
12 InvalidParam(String),
13
14 /// A GPU-side error (driver, memory allocation, kernel launch, or stream failure).
15 #[error("GPU RNG error: {0}")]
16 GpuError(String),
17}