ruda-core 0.1.0

Shared types, device contracts and utilities for Ruda.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use alloc::string::String;
use bytemuck::checked::CheckedCastError;
use thiserror::Error;

/// The things that can go wrong when manipulating tensor data.
#[derive(Debug, Error)]
pub enum DataError {
    /// Failed to cast the values to a specified element type.
    #[error("Failed to cast values to the specified element type.\nError:\n  {0}")]
    CastError(CheckedCastError),
    /// Invalid target element type.
    #[error("{0}")]
    TypeMismatch(String),
}