Skip to main content

SliceCast

Struct SliceCast 

Source
pub struct SliceCast<To, From> { /* private fields */ }
Expand description

A zero-sized type providing implementations of diskann_wide::arch::Target2 to provide platform-dependent conversions between slices of the two generic types.

Implementations§

Source§

impl<To, From> SliceCast<To, From>

Source

pub fn new() -> Self

Trait Implementations§

Source§

impl<To: Clone, From: Clone> Clone for SliceCast<To, From>

Source§

fn clone(&self) -> SliceCast<To, From>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<To: Debug, From: Debug> Debug for SliceCast<To, From>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<To: Default, From: Default> Default for SliceCast<To, From>

Source§

fn default() -> SliceCast<To, From>

Returns the “default value” for a type. Read more
Source§

impl<T, U> Target2<Scalar, (), T, U> for SliceCast<f16, f32>
where T: AsMut<[f16]>, U: AsRef<[f32]>,

Source§

fn run(self, _: Scalar, to: T, from: U)

Run the operation with the provided Architecture.
Source§

impl<T, U> Target2<Scalar, (), T, U> for SliceCast<f32, f16>
where T: AsMut<[f32]>, U: AsRef<[f16]>,

Source§

fn run(self, _: Scalar, to: T, from: U)

Run the operation with the provided Architecture.
Source§

impl<T, U, To, From> Target2<V3, (), T, U> for SliceCast<To, From>
where T: AsMut<[To]>, U: AsRef<[From]>, V3: SIMDConvert<To, From>,

Available on x86-64 only.
Source§

fn run(self, arch: V3, to: T, from: U)

Run the operation with the provided Architecture.
Source§

impl<T, U, To, From> Target2<V4, (), T, U> for SliceCast<To, From>
where T: AsMut<[To]>, U: AsRef<[From]>, V4: SIMDConvert<To, From>,

Available on x86-64 only.
Source§

fn run(self, arch: V4, to: T, from: U)

Run the operation with the provided Architecture.
Source§

impl<To: Copy, From: Copy> Copy for SliceCast<To, From>

Auto Trait Implementations§

§

impl<To, From> Freeze for SliceCast<To, From>

§

impl<To, From> RefUnwindSafe for SliceCast<To, From>
where To: RefUnwindSafe, From: RefUnwindSafe,

§

impl<To, From> Send for SliceCast<To, From>
where To: Send, From: Send,

§

impl<To, From> Sync for SliceCast<To, From>
where To: Sync, From: Sync,

§

impl<To, From> Unpin for SliceCast<To, From>
where To: Unpin, From: Unpin,

§

impl<To, From> UnsafeUnpin for SliceCast<To, From>

§

impl<To, From> UnwindSafe for SliceCast<To, From>
where To: UnwindSafe, From: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.