#[repr(i32)]pub enum VariableSynchronization {
Auto = 0,
None = 1,
OnWrite = 2,
OnRead = 3,
}
Expand description
Indicates when a distributed variable will be synced.
Variants§
Auto = 0
AUTO
: Indicates that the synchronization will be determined by the
current DistributionStrategy
(eg. With MirroredStrategy
this would be
ON_WRITE
).
None = 1
NONE
: Indicates that there will only be one copy of the variable, so
there is no need to sync.
OnWrite = 2
ON_WRITE
: Indicates that the variable will be updated across devices
every time it is written.
OnRead = 3
ON_READ
: Indicates that the variable will be aggregated across devices
when it is read (eg. when checkpointing or when evaluating an op that uses
the variable).
Implementations§
Source§impl VariableSynchronization
impl VariableSynchronization
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Trait Implementations§
Source§impl Clone for VariableSynchronization
impl Clone for VariableSynchronization
Source§fn clone(&self) -> VariableSynchronization
fn clone(&self) -> VariableSynchronization
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for VariableSynchronization
impl Debug for VariableSynchronization
Source§impl Default for VariableSynchronization
impl Default for VariableSynchronization
Source§fn default() -> VariableSynchronization
fn default() -> VariableSynchronization
Source§impl From<VariableSynchronization> for i32
impl From<VariableSynchronization> for i32
Source§fn from(value: VariableSynchronization) -> i32
fn from(value: VariableSynchronization) -> i32
Source§impl Hash for VariableSynchronization
impl Hash for VariableSynchronization
Source§impl Ord for VariableSynchronization
impl Ord for VariableSynchronization
Source§fn cmp(&self, other: &VariableSynchronization) -> Ordering
fn cmp(&self, other: &VariableSynchronization) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for VariableSynchronization
impl PartialEq for VariableSynchronization
Source§impl PartialOrd for VariableSynchronization
impl PartialOrd for VariableSynchronization
impl Copy for VariableSynchronization
impl Eq for VariableSynchronization
impl StructuralPartialEq for VariableSynchronization
Auto Trait Implementations§
impl Freeze for VariableSynchronization
impl RefUnwindSafe for VariableSynchronization
impl Send for VariableSynchronization
impl Sync for VariableSynchronization
impl Unpin for VariableSynchronization
impl UnwindSafe for VariableSynchronization
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
Source§impl<T> ClampCast for Twhere
T: PartialOrd + Copy + 'static,
impl<T> ClampCast for Twhere
T: PartialOrd + Copy + 'static,
fn clamp_cast<O>(self) -> O
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
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> ⓘ
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