------------------------------------------------------------------------------
| 1123 | |
| 1124 | //------------------------------------------------------------------------------ |
| 1125 | void 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 | //------------------------------------------------------------------------------ |
| 1155 | void vtkPDistributedDataFilter::FreeIntArrays(vtkIdTypeArray** ar) |
no outgoing calls
no test coverage detected