MixedPrecisionSupport

Trait MixedPrecisionSupport 

Source
pub trait MixedPrecisionSupport: ArrayProtocol {
    // Required methods
    fn to_precision(
        &self,
        precision: Precision,
    ) -> CoreResult<Box<dyn MixedPrecisionSupport>>;
    fn precision(&self) -> Precision;
    fn supports_precision(&self, precision: Precision) -> bool;
}
Expand description

Trait for arrays that support mixed-precision operations.

Required Methods§

Source

fn to_precision( &self, precision: Precision, ) -> CoreResult<Box<dyn MixedPrecisionSupport>>

Convert the array to the specified precision.

Source

fn precision(&self) -> Precision

Get the current precision of the array.

Source

fn supports_precision(&self, precision: Precision) -> bool

Check if the array supports the specified precision.

Implementors§

Source§

impl<T, D> MixedPrecisionSupport for GPUNdarray<T, D>
where T: Clone + Float + Send + Sync + 'static + Zero + Div<f64, Output = T>, D: Dimension + Send + Sync + 'static + RemoveAxis,

Implement MixedPrecisionSupport for GPUNdarray.

Source§

impl<T, D> MixedPrecisionSupport for MixedPrecisionArray<T, D>
where T: Clone + Float + Send + Sync + 'static, D: Dimension + Send + Sync + 'static,

Implement MixedPrecisionSupport for MixedPrecisionArray.