pub struct ExecutionEnvironment {
pub values: HashMap<NodeIndex, Tensor>,
/* private fields */
}Expand description
Execution environment for graph interpretation
Manages tensor storage and execution context during graph interpretation. Provides methods for storing and retrieving intermediate tensor values during execution.
Fields§
§values: HashMap<NodeIndex, Tensor>Tensor storage during execution
Implementations§
Source§impl ExecutionEnvironment
impl ExecutionEnvironment
Sourcepub fn new(device: DeviceType) -> Self
pub fn new(device: DeviceType) -> Self
Sourcepub fn store(&mut self, node: NodeIndex, tensor: Tensor)
pub fn store(&mut self, node: NodeIndex, tensor: Tensor)
Store a tensor value
§Arguments
node- Node index to store the tensor fortensor- Tensor value to store
Sourcepub fn device(&self) -> DeviceType
pub fn device(&self) -> DeviceType
Sourcepub fn value_count(&self) -> usize
pub fn value_count(&self) -> usize
Auto Trait Implementations§
impl Freeze for ExecutionEnvironment
impl RefUnwindSafe for ExecutionEnvironment
impl Send for ExecutionEnvironment
impl Sync for ExecutionEnvironment
impl Unpin for ExecutionEnvironment
impl UnsafeUnpin for ExecutionEnvironment
impl UnwindSafe for ExecutionEnvironment
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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