oxiphysics_gpu/compute/
gpuerror_traits.rs1use super::types::GpuError;
11
12impl std::fmt::Display for GpuError {
13 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14 match self {
15 GpuError::InvalidBuffer(id) => write!(f, "invalid buffer id: {}", id.0),
16 GpuError::SizeMismatch { expected, got } => {
17 write!(f, "size mismatch: expected {expected}, got {got}")
18 }
19 GpuError::EmptyBuffer => write!(f, "reduction on empty buffer"),
20 GpuError::NotFound(name) => write!(f, "not found: {name}"),
21 }
22 }
23}