Struct caffe2op_scope::WorkspaceStack
source · pub struct WorkspaceStack { /* private fields */ }
Expand description
| Keeps track of forward and backward | gradient workspaces in stack, reuses | previously created workspaces, non-thread | safe |
Implementations§
source§impl WorkspaceStack
impl WorkspaceStack
pub fn new() -> Self
pub fn push_forward_workspace( &mut self, parent_ws: *mut Workspace ) -> Arc<Workspace>
pub fn push_forward_workspace_with_bindings( &mut self, parent_ws: *mut Workspace, blob_bindings: &HashMap<String, String> ) -> Arc<Workspace>
pub fn pop_gradient_workspace( &mut self, parent_ws: *mut Workspace, grad_blob_bindings: &HashMap<String, String> ) -> Arc<Workspace>
pub fn reuse_last_forward_workspace( &mut self, parent_ws: *mut Workspace ) -> Arc<Workspace>
pub fn reuse_last_forward_workspace_with_bindings( &mut self, parent_ws: *mut Workspace, blob_bindings: &HashMap<String, String> ) -> Arc<Workspace>
pub fn clear(&mut self)
pub fn empty(&self) -> bool
pub fn check_stack(&self)
pub fn check_bindings_match( &self, bindings: &HashMap<String, String>, test_bindings: &HashMap<String, String> )
Auto Trait Implementations§
impl !RefUnwindSafe for WorkspaceStack
impl !Send for WorkspaceStack
impl !Sync for WorkspaceStack
impl Unpin for WorkspaceStack
impl !UnwindSafe for WorkspaceStack
Blanket Implementations§
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.