use super::*;
impl<const N: u32, const ES: u32, const RS: u32, Int: crate::Int>
Clone for Posit<N, ES, Int, RS> {
#[inline]
fn clone(&self) -> Self {
*self
}
}
impl<const N: u32, const ES: u32, const RS: u32, Int: crate::Int>
Copy for Posit<N, ES, Int, RS> {}
impl<const N: u32, const ES: u32, const RS: u32, Int: crate::Int>
PartialEq for Posit<N, ES, Int, RS> {
#[inline]
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl<const N: u32, const ES: u32, const RS: u32, Int: crate::Int>
Eq for Posit<N, ES, Int, RS> {}
impl<const N: u32, const ES: u32, const RS: u32, Int: crate::Int>
PartialOrd for Posit<N, ES, Int, RS> {
#[inline]
fn partial_cmp(&self, other: &Self) -> Option<core::cmp::Ordering> {
Some(self.cmp(other))
}
}
impl<const N: u32, const ES: u32, const RS: u32, Int: crate::Int>
Ord for Posit<N, ES, Int, RS> {
#[inline]
fn cmp(&self, other: &Self) -> core::cmp::Ordering {
self.0.cmp(&other.0)
}
}
impl<const N: u32, const ES: u32, const RS: u32, Int: crate::Int>
core::hash::Hash for Posit<N, ES, Int, RS> {
#[inline]
fn hash<H: core::hash::Hasher>(&self, state: &mut H) {
self.0.hash(state);
}
}
impl<const N: u32, const ES: u32, const RS: u32, Int: crate::Int>
Default for Posit<N, ES, Int, RS> {
#[inline]
fn default() -> Self {
Self(Default::default())
}
}