MyCaffe
1.12.2.41
Deep learning software for Windows C# programmers.
|
The BlockingQueue is used for synchronized Queue operations. More...
Public Member Functions | |
BlockingQueue (CancelEvent evtCancel) | |
The BlockingQueue constructor. More... | |
void | Reset () |
Reset the abort event. More... | |
void | Abort () |
Cancel the blocking queue operations. More... | |
bool | GetAt (int nIdx, ref T t) |
Returns the item at a given index within the queue. More... | |
void | Clear () |
Remove all items from the queue. More... | |
void | Push (T t) |
Add an item to the back of the queue. More... | |
bool | Pop (ref T t) |
Remove an item from the front of the queue. More... | |
bool | Peek (ref T t) |
Retrieve an item from the front of the queue, but do not remove it. More... | |
void | Dispose () |
Release all resources used by the queue. More... | |
Protected Member Functions | |
virtual void | Dispose (bool bDisposing) |
Release all resources used by the queue. More... | |
Properties | |
int | Count [get] |
Return the number of items in the queue. More... | |
The BlockingQueue is used for synchronized Queue operations.
T | Specifies the base type float or double. Using float is recommended to conserve GPU memory. |
Definition at line 14 of file BlockingQueue.cs.
MyCaffe.common.BlockingQueue< T >.BlockingQueue | ( | CancelEvent | evtCancel | ) |
The BlockingQueue constructor.
evtCancel | Specifies a CancelEvent used to terminate wait sates within the Queue. |
Definition at line 27 of file BlockingQueue.cs.
void MyCaffe.common.BlockingQueue< T >.Abort | ( | ) |
Cancel the blocking queue operations.
Definition at line 43 of file BlockingQueue.cs.
void MyCaffe.common.BlockingQueue< T >.Clear | ( | ) |
Remove all items from the queue.
Definition at line 102 of file BlockingQueue.cs.
void MyCaffe.common.BlockingQueue< T >.Dispose | ( | ) |
Release all resources used by the queue.
Definition at line 223 of file BlockingQueue.cs.
|
protectedvirtual |
Release all resources used by the queue.
bDisposing | Set to true when called from Dispose(). |
Definition at line 201 of file BlockingQueue.cs.
bool MyCaffe.common.BlockingQueue< T >.GetAt | ( | int | nIdx, |
ref T | t | ||
) |
Returns the item at a given index within the queue.
nIdx | Specifies the index. |
t | Specifies the data value at the index. |
Definition at line 62 of file BlockingQueue.cs.
bool MyCaffe.common.BlockingQueue< T >.Peek | ( | ref T | t | ) |
Retrieve an item from the front of the queue, but do not remove it.
This function will wait until either data is added to the queue or the CancelEvent or AbortEvent are set.
t | Specifies the item removed. |
Definition at line 177 of file BlockingQueue.cs.
bool MyCaffe.common.BlockingQueue< T >.Pop | ( | ref T | t | ) |
Remove an item from the front of the queue.
This function will wait until either data is added to the queue or the CancelEvent or AbortEvent are set.
t | Specifies the item removed. |
Definition at line 136 of file BlockingQueue.cs.
void MyCaffe.common.BlockingQueue< T >.Push | ( | T | t | ) |
Add an item to the back of the queue.
t | Specifies the item to add. |
Definition at line 115 of file BlockingQueue.cs.
void MyCaffe.common.BlockingQueue< T >.Reset | ( | ) |
Reset the abort event.
Definition at line 35 of file BlockingQueue.cs.
|
get |
Return the number of items in the queue.
Definition at line 51 of file BlockingQueue.cs.