pub struct DataLayoutOptimizer;Expand description
Data layout optimization utilities
Implementations§
Source§impl DataLayoutOptimizer
impl DataLayoutOptimizer
Sourcepub fn aos_to_soa<F: IntegrateFloat>(
data: &[(F, F, F)],
) -> (Vec<F>, Vec<F>, Vec<F>)
pub fn aos_to_soa<F: IntegrateFloat>( data: &[(F, F, F)], ) -> (Vec<F>, Vec<F>, Vec<F>)
Convert Array of Structures (AoS) to Structure of Arrays (SoA)
Sourcepub fn soa_to_aos<F: IntegrateFloat>(
x_values: &[F],
y_values: &[F],
z_values: &[F],
) -> Vec<(F, F, F)>
pub fn soa_to_aos<F: IntegrateFloat>( x_values: &[F], y_values: &[F], z_values: &[F], ) -> Vec<(F, F, F)>
Convert Structure of Arrays (SoA) to Array of Structures (AoS)
Sourcepub fn spatial_reorder<F: IntegrateFloat>(data: &mut [(F, F)])
pub fn spatial_reorder<F: IntegrateFloat>(data: &mut [(F, F)])
Reorder data for better spatial locality
Auto Trait Implementations§
impl Freeze for DataLayoutOptimizer
impl RefUnwindSafe for DataLayoutOptimizer
impl Send for DataLayoutOptimizer
impl Sync for DataLayoutOptimizer
impl Unpin for DataLayoutOptimizer
impl UnwindSafe for DataLayoutOptimizer
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 more