| 375 | return retVal; |
| 376 | } |
| 377 | int vtkPChacoReader::SendGrid(vtkMultiProcessController* contr, int to, vtkUnstructuredGrid* grid) |
| 378 | { |
| 379 | int retVal = 1; |
| 380 | |
| 381 | vtkIdType bufsize = 0; |
| 382 | int ack = 0; |
| 383 | |
| 384 | if (!grid) |
| 385 | { |
| 386 | // sending notice of a failure |
| 387 | |
| 388 | contr->Send(&bufsize, 1, to, 0x11); |
| 389 | return retVal; |
| 390 | } |
| 391 | |
| 392 | char* buf = this->MarshallDataSet(grid, bufsize); |
| 393 | |
| 394 | contr->Send(&bufsize, 1, to, 0x11); |
| 395 | |
| 396 | contr->Receive(&ack, 1, to, 0x12); |
| 397 | |
| 398 | if (!ack) |
| 399 | { |
| 400 | retVal = 0; |
| 401 | } |
| 402 | else |
| 403 | { |
| 404 | contr->Send(buf, bufsize, to, 0x13); |
| 405 | } |
| 406 | |
| 407 | delete[] buf; |
| 408 | return retVal; |
| 409 | } |
| 410 | vtkUnstructuredGrid* vtkPChacoReader::GetGrid(vtkMultiProcessController* contr, int from) |
| 411 | { |
| 412 | vtkUnstructuredGrid* grid = nullptr; |
no test coverage detected