use std::fmt::Debug;
use crate::core::error::{Error, Result};
use crate::na::NA;
use crate::series::base::Series;
pub trait SeriesGpuExt<T: Debug + Clone> {
fn gpu_accelerate(&self) -> Result<Self>
where
Self: Sized;
fn gpu_sum(&self) -> Result<T>;
fn gpu_mean(&self) -> Result<T>;
fn gpu_std(&self) -> Result<T>;
fn gpu_corr(&self, other: &Self) -> Result<f64>
where
Self: Sized;
}
impl SeriesGpuExt<f64> for Series<f64> {
fn gpu_accelerate(&self) -> Result<Self> {
Ok(self.clone())
}
fn gpu_sum(&self) -> Result<f64> {
Ok(0.0)
}
fn gpu_mean(&self) -> Result<f64> {
Ok(0.0)
}
fn gpu_std(&self) -> Result<f64> {
Ok(0.0)
}
fn gpu_corr(&self, other: &Self) -> Result<f64> {
Ok(0.0)
}
}