| 234 | } |
| 235 | |
| 236 | int TestPStream(int argc, char* argv[]) |
| 237 | { |
| 238 | vtkMPIController* contr = vtkMPIController::New(); |
| 239 | contr->Initialize(&argc, &argv); |
| 240 | contr->CreateOutputWindow(); |
| 241 | |
| 242 | // When using MPI, the number of processes is determined |
| 243 | // by the external program which launches this application. |
| 244 | // However, when using threads, we need to set it ourselves. |
| 245 | if (contr->IsA("vtkThreadedController")) |
| 246 | { |
| 247 | // Set the number of processes to 2 for this example. |
| 248 | contr->SetNumberOfProcesses(2); |
| 249 | } |
| 250 | |
| 251 | // Added for regression test. |
| 252 | // ---------------------------------------------- |
| 253 | int retVal; |
| 254 | PStreamArgs_tmp args; |
| 255 | args.retVal = &retVal; |
| 256 | args.argc = argc; |
| 257 | args.argv = argv; |
| 258 | // ---------------------------------------------- |
| 259 | |
| 260 | contr->SetSingleMethod(MyMain, &args); |
| 261 | contr->SingleMethodExecute(); |
| 262 | |
| 263 | contr->Finalize(); |
| 264 | contr->Delete(); |
| 265 | |
| 266 | return !retVal; |
| 267 | } |
nothing calls this directly
no test coverage detected