Numerical computing and tensor library for Rust, in the role of NumPy: n-dimensional arrays, linear algebra, FFT, statistics and autograd on CPU, CUDA and WebGPU
//! Trait for device identification
usesuper::profile::DeviceProfile;/// Trait for device identification
pubtraitDevice: Clone + Send + Sync + 'static {/// Unique identifier for this device
fnid(&self)->usize;/// Check if two devices are the same
fnis_same(&self, other:&Self)->bool{self.id()== other.id()}/// Human-readable name
fnname(&self)-> String{format!("Device({})",self.id())}/// Real hardware capability snapshot for kernel/tile selection.
////// Default is `DeviceProfile::unknown()` so existing backends keep
/// compiling without an override; a backend that wants callers to make
/// informed kernel choices must query and cache its own real values.
fnprofile(&self)-> DeviceProfile{DeviceProfile::unknown("unknown")}}