![]() |
MyCaffe
1.12.2.41
Deep learning software for Windows C# programmers.
|
The InternalThread manages an internal thread used for Parallel and data collection operations. More...
Public Member Functions | |
| InternalThread (bool bUseThreadVsTask=false) | |
| The InternalThread constructor. More... | |
| void | Dispose () |
| Releases all resources used by the InernalThread. More... | |
| void | StartInternalThread (CudaDnn< T > cuda, Log log, int nDeviceID=0, object arg=null, int nInitialDelay=0) |
| Starts running the internal thread function which then calls the DoWork event. More... | |
| void | StopInternalThread () |
| Stops the internal thread. More... | |
Protected Member Functions | |
| virtual void | Dispose (bool bDisposing) |
| Releases all resources used by the InernalThread. More... | |
| void | InternalThreadEntry (object obj) |
| Specifies the internal thread entry. More... | |
Properties | |
| bool | CancellationPending [get] |
| Returns whether or not a cancellation is pending. More... | |
| bool | IsStarted [get] |
| Returns whether or not the internal thread has been started. More... | |
Events | |
| EventHandler< ActionStateArgs< T > > | DoWork |
| The DoWork event is the working thread function. More... | |
| EventHandler | OnPreStop |
| The OnPreStop event fires just after signalling the thread to stop. More... | |
| EventHandler | OnPreStart |
| The OnPreStart event fires just before starting the thread. More... | |
The InternalThread manages an internal thread used for Parallel and data collection operations.
| T | Specifies the base type float or double. Using float is recommended to conserve GPU memory. |
Definition at line 15 of file InternalThread.cs.
| MyCaffe.common.InternalThread< T >.InternalThread | ( | bool | bUseThreadVsTask = false | ) |
The InternalThread constructor.
| bUseThreadVsTask | Optionally, specifies to use a Thread vs a Task (default = false, e.g. use Task). |
Definition at line 42 of file InternalThread.cs.
| void MyCaffe.common.InternalThread< T >.Dispose | ( | ) |
Releases all resources used by the InernalThread.
Definition at line 68 of file InternalThread.cs.
|
protectedvirtual |
Releases all resources used by the InernalThread.
| bDisposing | Set to true when called from Dispose(). |
Definition at line 51 of file InternalThread.cs.
|
protected |
Specifies the internal thread entry.
| obj |
Definition at line 141 of file InternalThread.cs.
| void MyCaffe.common.InternalThread< T >.StartInternalThread | ( | CudaDnn< T > | cuda, |
| Log | log, | ||
| int | nDeviceID = 0, |
||
| object | arg = null, |
||
| int | nInitialDelay = 0 |
||
| ) |
Starts running the internal thread function which then calls the DoWork event.
| cuda | Specifies the CudaDnn connection to Cuda placed in the ActionStartArgs passed along to DoWork. |
| log | Specifies the Log for output, placed in the ActionStartArgs passed along to DoWork. |
| nDeviceID | Optionally, specifies the DeviceID placed in the ActionStartArgs passed along to DoWork. |
| arg | Optionally, specifies an argument defined by the caller. |
| nInitialDelay | Optionally, specifies an initial delay in ms (default = 0). |
Definition at line 81 of file InternalThread.cs.
| void MyCaffe.common.InternalThread< T >.StopInternalThread | ( | ) |
Stops the internal thread.
Definition at line 117 of file InternalThread.cs.
|
get |
Returns whether or not a cancellation is pending.
Definition at line 164 of file InternalThread.cs.
|
get |
Returns whether or not the internal thread has been started.
Definition at line 178 of file InternalThread.cs.
| EventHandler<ActionStateArgs<T> > MyCaffe.common.InternalThread< T >.DoWork |
The DoWork event is the working thread function.
Definition at line 28 of file InternalThread.cs.
| EventHandler MyCaffe.common.InternalThread< T >.OnPreStart |
The OnPreStart event fires just before starting the thread.
Definition at line 36 of file InternalThread.cs.
| EventHandler MyCaffe.common.InternalThread< T >.OnPreStop |
The OnPreStop event fires just after signalling the thread to stop.
Definition at line 32 of file InternalThread.cs.