pub struct DeviceAssignment { /* private fields */ }Implementations§
Source§impl DeviceAssignment
impl DeviceAssignment
pub fn new( num_replicas: usize, num_partitions: usize, assignments: Vec<GlobalDeviceId>, ) -> Self
pub fn num_replicas(&self) -> usize
pub fn num_partitions(&self) -> usize
pub fn lookup_logical_id( &self, global_device_id: GlobalDeviceId, ) -> Result<LogicalId>
pub fn get_lookup_map(&self) -> HashMap<GlobalDeviceId, LogicalId>
Trait Implementations§
Source§impl Clone for DeviceAssignment
impl Clone for DeviceAssignment
Source§fn clone(&self) -> DeviceAssignment
fn clone(&self) -> DeviceAssignment
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeviceAssignment
impl Debug for DeviceAssignment
Source§impl Hash for DeviceAssignment
impl Hash for DeviceAssignment
Source§impl Ord for DeviceAssignment
impl Ord for DeviceAssignment
Source§impl PartialEq for DeviceAssignment
impl PartialEq for DeviceAssignment
Source§impl PartialOrd for DeviceAssignment
impl PartialOrd for DeviceAssignment
impl Eq for DeviceAssignment
impl StructuralPartialEq for DeviceAssignment
Auto Trait Implementations§
impl Freeze for DeviceAssignment
impl RefUnwindSafe for DeviceAssignment
impl Send for DeviceAssignment
impl Sync for DeviceAssignment
impl Unpin for DeviceAssignment
impl UnwindSafe for DeviceAssignment
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)