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

Method SetUpPairWiseExchange

Filters/ParallelGeometry/vtkPDistributedDataFilter.cxx:1125–1152  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1123
1124//------------------------------------------------------------------------------
1125void vtkPDistributedDataFilter::SetUpPairWiseExchange()
1126{
1127 TimeLog timer("SetUpPairWiseExchange", this->Timing);
1128 (void)timer;
1129
1130 int iam = this->MyId;
1131 int nprocs = this->NumProcesses;
1132
1133 delete[] this->Target;
1134 this->Target = nullptr;
1135
1136 delete[] this->Source;
1137 this->Source = nullptr;
1138
1139 if (nprocs == 1)
1140 {
1141 return;
1142 }
1143
1144 this->Target = new int[nprocs - 1];
1145 this->Source = new int[nprocs - 1];
1146
1147 for (int i = 1; i < nprocs; i++)
1148 {
1149 this->Target[i - 1] = (iam + i) % nprocs;
1150 this->Source[i - 1] = (iam + nprocs - i) % nprocs;
1151 }
1152}
1153
1154//------------------------------------------------------------------------------
1155void vtkPDistributedDataFilter::FreeIntArrays(vtkIdTypeArray** ar)

Callers 4

ExchangeCountsLeanMethod · 0.95
ExchangeIdArraysLeanMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected