pub struct SimdKernels {
pub dot_f32: unsafe extern "C" fn(*const f32, *const f32, u64) -> f32,
pub l2sq_f32: unsafe extern "C" fn(*const f32, *const f32, u64) -> f32,
pub add_f32: unsafe extern "C" fn(*const f32, *const f32, *mut f32, u64),
pub scale_f32: unsafe extern "C" fn(*const f32, f32, *mut f32, u64),
/* private fields */
}Expand description
Finalized SIMD kernel entry points. The owning JITModule is
kept alive alongside the pointers (dropping it would unmap the
code pages).
Fields§
§dot_f32: unsafe extern "C" fn(*const f32, *const f32, u64) -> f32Dot product of two f32 slices of the given length.
l2sq_f32: unsafe extern "C" fn(*const f32, *const f32, u64) -> f32Squared L2 distance between two f32 slices of the given length.
add_f32: unsafe extern "C" fn(*const f32, *const f32, *mut f32, u64)Element-wise sum of two f32 slices into the output slice.
scale_f32: unsafe extern "C" fn(*const f32, f32, *mut f32, u64)Each element of an f32 slice times a scalar, into the output slice.
Trait Implementations§
impl Send for SimdKernels
impl Sync for SimdKernels
Auto Trait Implementations§
impl !Freeze for SimdKernels
impl !RefUnwindSafe for SimdKernels
impl !UnwindSafe for SimdKernels
impl Unpin for SimdKernels
impl UnsafeUnpin for SimdKernels
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more