----------------------- Lean versions ----------------------------//
| 1316 | |
| 1317 | // ----------------------- Lean versions ----------------------------// |
| 1318 | vtkIdTypeArray* vtkPDistributedDataFilter::ExchangeCountsLean(vtkIdType myCount, int tag) |
| 1319 | { |
| 1320 | vtkIdTypeArray* countArray = nullptr; |
| 1321 | |
| 1322 | vtkIdType i; |
| 1323 | int nprocs = this->NumProcesses; |
| 1324 | |
| 1325 | vtkMPICommunicator::Request req; |
| 1326 | vtkMPIController* mpiContr = vtkMPIController::SafeDownCast(this->Controller); |
| 1327 | |
| 1328 | vtkIdType* counts = new vtkIdType[nprocs]; |
| 1329 | counts[this->MyId] = myCount; |
| 1330 | |
| 1331 | if (!this->Source) |
| 1332 | { |
| 1333 | this->SetUpPairWiseExchange(); |
| 1334 | } |
| 1335 | |
| 1336 | for (i = 0; i < this->NumProcesses - 1; i++) |
| 1337 | { |
| 1338 | int source = this->Source[i]; |
| 1339 | int target = this->Target[i]; |
| 1340 | mpiContr->NoBlockReceive(counts + source, 1, source, tag, req); |
| 1341 | mpiContr->Send(&myCount, 1, target, tag); |
| 1342 | req.Wait(); |
| 1343 | } |
| 1344 | |
| 1345 | countArray = vtkIdTypeArray::New(); |
| 1346 | countArray->SetArray(counts, nprocs, 0, vtkIdTypeArray::VTK_DATA_ARRAY_DELETE); |
| 1347 | |
| 1348 | return countArray; |
| 1349 | } |
| 1350 | |
| 1351 | //------------------------------------------------------------------------------ |
| 1352 | vtkFloatArray** vtkPDistributedDataFilter::ExchangeFloatArraysLean( |
no test coverage detected