pub trait ScalarDefault { }Expand description
A default implementation for ScalarBackend.
This trait is for simple implementations of the Scalar trait which don’t
require any SIMD optimizations.
Don’t use this trait as a generic bound because types that implement
ScalarDefault today might silently switch to manually implementing
ScalarBackend in the future.
§Example
use ggmath::{Scalar, ScalarDefault};
#[derive(Debug, Clone, Copy)]
struct Foo(f32);
impl Scalar for Foo {}
impl ScalarDefault for Foo {}
// later we can swap this for a manual implementation of `ScalarBackend` to
// add SIMD optimizations.