#include <vtkThreadedController.h>
Inheritance diagram for vtkThreadedController:
Public Methods | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
void | Initialize (int argc, char *arcv[]) |
virtual int | GetLocalProcessId () |
void | SingleMethodExecute () |
void | MultipleMethodExecute () |
int | Send (vtkDataObject *data, int remoteProcessId, int tag) |
int | Send (int *data, int length, int remoteProcessId, int tag) |
int | Send (unsigned long *data, int length, int remoteProcessId, int tag) |
int | Send (char *data, int length, int remoteProcessId, int tag) |
int | Send (float *data, int length, int remoteProcessId, int tag) |
int | Receive (vtkDataObject *data, int remoteProcessId, int tag) |
int | Receive (int *data, int length, int remoteProcessId, int tag) |
int | Receive (unsigned long *data, int length, int remoteProcessId, int tag) |
int | Receive (char *data, int length, int remoteProcessId, int tag) |
int | Receive (float *data, int length, int remoteProcessId, int tag) |
void | Start (int threadIdx) |
Static Public Methods | |
vtkThreadedController * | New () |
int | IsTypeOf (const char *type) |
vtkThreadedController * | SafeDownCast (vtkObject *o) |
Protected Methods | |
vtkThreadedController () | |
~vtkThreadedController () | |
vtkThreadedController (const vtkThreadedController &) | |
void | operator= (const vtkThreadedController &) |
void | CreateProcessControllers () |
vtkThreadedControllerMessage * | NewMessage (vtkDataObject *object, void *data, int dataLength) |
void | DeleteMessage (vtkThreadedControllerMessage *message) |
void | AddMessage (vtkThreadedControllerMessage *message) |
vtkThreadedControllerMessage * | FindMessage (int sendId, int tag) |
int | Send (vtkDataObject *object, void *data, int dataLength, int remoteProcessId, int tag) |
int | Receive (vtkDataObject *object, void *data, int dataLength, int remoteProcessId, int tag) |
vtkMultiProcessController * | GetLocalController () |
Protected Attributes | |
vtkThreadedController * | Controllers [VTK_MP_CONTROLLER_MAX_PROCESSES] |
int | LocalProcessId |
int | WaitingForId |
vtkMultiThreader * | MultiThreader |
int | MultipleMethodFlag |
vtkMutexLock * | MessageListLock |
vtkMutexLock * | Gate |
vtkThreadedControllerMessage * | MessageListStart |
vtkThreadedControllerMessage * | MessageListEnd |
FILE * | LogFile |
vtkThreadedController just uses a vtkMultiThreader to spawn threads. It the implements sends and receives using shared memory and reference counting.
Unfortunately, as this is written, it is not thread safe. All threads use the same controller object, so operations like adding an RMI could potentially conflict. We need to have our own RegisterAndGetGlobalController method to create different controllers for each thread. This would also simplify the GetLocalProcessId methods.
Definition at line 72 of file vtkThreadedController.h.
|
|
|
|
|
Definition at line 125 of file vtkThreadedController.h. |
|
Create an object with Debug turned off, modified time initialized to zero, and reference counting on. Reimplemented from vtkMultiProcessController. |
|
Return the class name as a string. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h. Reimplemented from vtkMultiProcessController. |
|
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h. Reimplemented from vtkMultiProcessController. |
|
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h. Reimplemented from vtkMultiProcessController. |
|
Will cast the supplied object to vtkObject* is this is a safe operation (i.e., a safe downcast); otherwise NULL is returned. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h. Reimplemented from vtkMultiProcessController. |
|
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes. Reimplemented from vtkMultiProcessController. |
|
This method is for setting up the processes. |
|
This method returns an integer from 0 to (NumberOfProcesses-1) indicating which process we are in. Note: The correct controller is passed as an argument to the initial function (SingleMethod/MultipleMethod). Calling this method on another controller may give wrong results. Reimplemented from vtkMultiProcessController. |
|
Execute the SingleMethod (as define by SetSingleMethod) using this->NumberOfProcesses processes. This will only return when all the processes finish executing their methods. Reimplemented from vtkMultiProcessController. |
|
Execute the MultipleMethods (as define by calling SetMultipleMethod for each of the required this->NumberOfProcesses methods) using this->NumberOfProcesses processes. Reimplemented from vtkMultiProcessController. |
|
This method sends data to another process. Tag eliminates ambiguity and is used to match sends with receives. Reimplemented from vtkMultiProcessController. |
|
Subclass have to supply these methods to send various arrays of data. Reimplemented from vtkMultiProcessController. |
|
Reimplemented from vtkMultiProcessController. |
|
Reimplemented from vtkMultiProcessController. |
|
Reimplemented from vtkMultiProcessController. |
|
This method receives data from a corresponding send. It blocks until the receive is finished. Reimplemented from vtkMultiProcessController. |
|
Subclass have to supply these methods to receive various arrays of data. The methods also have to support a remoteProcessId of VTK_MP_CONTROLLER_ANY_SOURCE Reimplemented from vtkMultiProcessController. |
|
Reimplemented from vtkMultiProcessController. |
|
Reimplemented from vtkMultiProcessController. |
|
Reimplemented from vtkMultiProcessController. |
|
First method called after threads are spawned. It is public because the function vtkThreadedControllerStart is not a friend yet. You should not call this method. |
|
Definition at line 126 of file vtkThreadedController.h. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Reimplemented from vtkMultiProcessController. |
|
Definition at line 136 of file vtkThreadedController.h. |
|
Reimplemented from vtkMultiProcessController. Definition at line 147 of file vtkThreadedController.h. |
|
Definition at line 148 of file vtkThreadedController.h. |
|
Definition at line 150 of file vtkThreadedController.h. |
|
Definition at line 152 of file vtkThreadedController.h. |
|
Definition at line 157 of file vtkThreadedController.h. |
|
Definition at line 161 of file vtkThreadedController.h. |
|
Definition at line 164 of file vtkThreadedController.h. |
|
Definition at line 165 of file vtkThreadedController.h. |
|
Definition at line 168 of file vtkThreadedController.h. |