pub struct ScalarState { /* private fields */ }Expand description
Handles the scalar state of an element type
The scalars are grouped to reduce the number of buffers needed to send data to the compute device.
Implementations§
Source§impl ScalarState
impl ScalarState
Sourcepub fn push<T: CubeScalar>(&mut self, val: T)
pub fn push<T: CubeScalar>(&mut self, val: T)
Add a new scalar value to the state.
Sourcepub fn push_raw(&mut self, bytes: &[u8], dtype: StorageType)
pub fn push_raw(&mut self, bytes: &[u8], dtype: StorageType)
Add a new raw value to the state.
Trait Implementations§
Source§impl Clone for ScalarState
impl Clone for ScalarState
Source§fn clone(&self) -> ScalarState
fn clone(&self) -> ScalarState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for ScalarState
impl Default for ScalarState
Source§fn default() -> ScalarState
fn default() -> ScalarState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ScalarState
impl RefUnwindSafe for ScalarState
impl Send for ScalarState
impl Sync for ScalarState
impl Unpin for ScalarState
impl UnwindSafe for ScalarState
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