Set one of the user defined methods that will be run on NumberOfThreads threads when MultipleMethodExecute is called. This method should be called with index = 0, 1, .., NumberOfThreads-1 to set up all the required user defined methods
| 170 | // called with index = 0, 1, .., NumberOfThreads-1 to set up all the |
| 171 | // required user defined methods |
| 172 | void vtkMultiThreader::SetMultipleMethod(int index, vtkThreadFunctionType f, void* data) |
| 173 | { |
| 174 | // You can only set the method for 0 through NumberOfThreads-1 |
| 175 | if (index >= this->NumberOfThreads) |
| 176 | { |
| 177 | vtkErrorMacro(<< "Can't set method " << index << " with a thread count of " |
| 178 | << this->NumberOfThreads); |
| 179 | } |
| 180 | else |
| 181 | { |
| 182 | this->MultipleMethod[index] = f; |
| 183 | this->MultipleData[index] = data; |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | // Execute the method set as the SingleMethod on NumberOfThreads threads. |
| 188 | void vtkMultiThreader::SingleMethodExecute() |