Struct caffe2_queue::BlobsQueue
source · pub struct BlobsQueue { /* private fields */ }
Expand description
| A thread-safe, bounded, blocking queue. | | Modelled as a circular buffer. | | Containing blobs are owned by the workspace. | | On read, we swap out the underlying data for | the blob passed in for blobs
Implementations§
source§impl BlobsQueue
impl BlobsQueue
pub fn get_num_blobs(&self) -> usize
source§impl BlobsQueue
impl BlobsQueue
pub fn new( ws: *mut Workspace, queue_name: &String, capacity: usize, num_blobs: usize, enforce_unique_name: bool, field_names: &Vec<String> ) -> Self
pub fn blocking_read( &mut self, inputs: &Vec<*mut Blob>, timeout_secs: f32 ) -> bool
pub fn try_write(&mut self, inputs: &Vec<*mut Blob>) -> bool
pub fn blocking_write(&mut self, inputs: &Vec<*mut Blob>) -> bool
pub fn close(&mut self)
pub fn can_write(&mut self) -> bool
pub fn do_write(&mut self, inputs: &Vec<*mut Blob>)
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for BlobsQueue
impl !Send for BlobsQueue
impl !Sync for BlobsQueue
impl Unpin for BlobsQueue
impl UnwindSafe for BlobsQueue
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.