MCPcopy Create free account
hub / github.com/Kitware/VTK / ExchangeCountsLean

Method ExchangeCountsLean

Filters/ParallelGeometry/vtkPDistributedDataFilter.cxx:1318–1349  ·  view source on GitHub ↗

----------------------- Lean versions ----------------------------//

Source from the content-addressed store, hash-verified

1316
1317// ----------------------- Lean versions ----------------------------//
1318vtkIdTypeArray* 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//------------------------------------------------------------------------------
1352vtkFloatArray** vtkPDistributedDataFilter::ExchangeFloatArraysLean(

Callers 1

ExchangeCountsMethod · 0.95

Calls 6

SetUpPairWiseExchangeMethod · 0.95
NoBlockReceiveMethod · 0.80
NewFunction · 0.50
SendMethod · 0.45
WaitMethod · 0.45
SetArrayMethod · 0.45

Tested by

no test coverage detected