pub struct DistancePool { /* private fields */ }Expand description
Advanced-optimized distance computation memory pool
Implementations§
Source§impl DistancePool
impl DistancePool
Sourcepub fn with_config(capacity: usize, config: MemoryPoolConfig) -> Self
pub fn with_config(capacity: usize, config: MemoryPoolConfig) -> Self
Create a pool with custom configuration
Sourcepub fn get_distance_buffer(&self, size: usize) -> DistanceBuffer<'_>
pub fn get_distance_buffer(&self, size: usize) -> DistanceBuffer<'_>
Get a cache-aligned distance buffer
Sourcepub fn get_index_buffer(&self, size: usize) -> IndexBuffer<'_>
pub fn get_index_buffer(&self, size: usize) -> IndexBuffer<'_>
Get an index buffer for storing indices
Sourcepub fn get_matrix_buffer(&self, rows: usize, cols: usize) -> MatrixBuffer<'_>
pub fn get_matrix_buffer(&self, rows: usize, cols: usize) -> MatrixBuffer<'_>
Get a distance matrix buffer
Sourcepub fn bind_thread_to_numa_node(node: u32) -> Result<(), Box<dyn Error>>
pub fn bind_thread_to_numa_node(node: u32) -> Result<(), Box<dyn Error>>
Bind current thread to specific NUMA node for better locality
Sourcepub fn get_numa_topology() -> NumaTopology
pub fn get_numa_topology() -> NumaTopology
Get NUMA topology information
Sourcepub fn statistics(&self) -> PoolStatistics
pub fn statistics(&self) -> PoolStatistics
Get pool statistics for performance monitoring
Sourcepub fn memory_usage(&self) -> usize
pub fn memory_usage(&self) -> usize
Get current memory usage in bytes
Sourcepub fn current_numa_node(&self) -> i32
pub fn current_numa_node(&self) -> i32
Get current NUMA node
Auto Trait Implementations§
impl !Freeze for DistancePool
impl RefUnwindSafe for DistancePool
impl Send for DistancePool
impl Sync for DistancePool
impl Unpin for DistancePool
impl UnwindSafe for DistancePool
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
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.