pub struct GpuMetricsComputer { /* private fields */ }Expand description
GPU-accelerated metrics computer with comprehensive hardware detection
Implementations§
Source§impl GpuMetricsComputer
impl GpuMetricsComputer
Sourcepub fn new(config: GpuAccelConfig) -> Result<Self>
pub fn new(config: GpuAccelConfig) -> Result<Self>
Create new GPU metrics computer with hardware detection
Sourcepub fn with_parallel_config(self, config: ParallelConfig) -> Self
pub fn with_parallel_config(self, config: ParallelConfig) -> Self
Configure parallel processing
Sourcepub fn should_use_gpu(&self, datasize: usize) -> bool
pub fn should_use_gpu(&self, datasize: usize) -> bool
Check if GPU acceleration should be used for given data size
Sourcepub fn is_gpu_available(&self) -> bool
pub fn is_gpu_available(&self) -> bool
Check if GPU is available
Sourcepub fn get_gpu_info(&self) -> Option<&GpuInfo>
pub fn get_gpu_info(&self) -> Option<&GpuInfo>
Get GPU information if available
Sourcepub fn get_capabilities(&self) -> &PlatformCapabilities
pub fn get_capabilities(&self) -> &PlatformCapabilities
Get hardware capabilities information
Sourcepub fn gpu_accuracy(
&self,
y_true: &Array1<i32>,
ypred: &Array1<i32>,
) -> Result<f32>
pub fn gpu_accuracy( &self, y_true: &Array1<i32>, ypred: &Array1<i32>, ) -> Result<f32>
Compute accuracy on GPU with intelligent fallback
Sourcepub fn gpu_mse<F>(&self, y_true: &Array1<F>, ypred: &Array1<F>) -> Result<F>
pub fn gpu_mse<F>(&self, y_true: &Array1<F>, ypred: &Array1<F>) -> Result<F>
Compute MSE on GPU with SIMD fallback
Sourcepub fn simd_mse<F>(&self, y_true: &Array1<F>, ypred: &Array1<F>) -> Result<F>
pub fn simd_mse<F>(&self, y_true: &Array1<F>, ypred: &Array1<F>) -> Result<F>
SIMD-accelerated MSE computation
Sourcepub fn simd_accuracy(
&self,
y_true: &Array1<i32>,
ypred: &Array1<i32>,
) -> Result<f32>
pub fn simd_accuracy( &self, y_true: &Array1<i32>, ypred: &Array1<i32>, ) -> Result<f32>
SIMD-accelerated accuracy computation
Sourcepub fn gpu_confusion_matrix(
&self,
y_true: &Array1<i32>,
ypred: &Array1<i32>,
num_classes: usize,
) -> Result<Array2<i32>>
pub fn gpu_confusion_matrix( &self, y_true: &Array1<i32>, ypred: &Array1<i32>, num_classes: usize, ) -> Result<Array2<i32>>
Compute confusion matrix on GPU (falls back to CPU)
Sourcepub fn gpu_batch_metrics<F>(
&self,
y_true_batch: ArrayView2<'_, F>,
y_pred_batch: ArrayView2<'_, F>,
metrics: &[&str],
) -> Result<Vec<HashMap<String, F>>>
pub fn gpu_batch_metrics<F>( &self, y_true_batch: ArrayView2<'_, F>, y_pred_batch: ArrayView2<'_, F>, metrics: &[&str], ) -> Result<Vec<HashMap<String, F>>>
GPU-accelerated batch metric computation with comprehensive fallbacks
Sourcepub fn simd_mae<F>(&self, y_true: &Array1<F>, ypred: &Array1<F>) -> Result<F>
pub fn simd_mae<F>(&self, y_true: &Array1<F>, ypred: &Array1<F>) -> Result<F>
SIMD-accelerated MAE computation
Sourcepub fn simd_r2_score<F>(
&self,
y_true: &Array1<F>,
ypred: &Array1<F>,
) -> Result<F>
pub fn simd_r2_score<F>( &self, y_true: &Array1<F>, ypred: &Array1<F>, ) -> Result<F>
SIMD-accelerated R² score computation
Sourcepub fn benchmark_implementations<F>(
&self,
y_true: &Array1<F>,
ypred: &Array1<F>,
iterations: usize,
) -> Result<BenchmarkResults>
pub fn benchmark_implementations<F>( &self, y_true: &Array1<F>, ypred: &Array1<F>, iterations: usize, ) -> Result<BenchmarkResults>
Benchmark different implementations to choose the best one
Auto Trait Implementations§
impl Freeze for GpuMetricsComputer
impl RefUnwindSafe for GpuMetricsComputer
impl Send for GpuMetricsComputer
impl Sync for GpuMetricsComputer
impl Unpin for GpuMetricsComputer
impl UnwindSafe for GpuMetricsComputer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.