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

Method AllCheckParameters

Filters/Parallel/vtkPKdTree.cxx:232–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230}
231
232void vtkPKdTree::AllCheckParameters()
233{
234 SCOPETIMER("AllCheckParameters");
235
236 int param[10];
237 int param0[10];
238
239 // All the parameters that determine how k-d tree is built and
240 // what tables get created afterward - there's no point in
241 // trying to build unless these match on all processes.
242
243 param[0] = this->ValidDirections;
244 param[1] = this->GetMinCells();
245 param[2] = this->GetNumberOfRegionsOrLess();
246 param[3] = this->GetNumberOfRegionsOrMore();
247 param[4] = this->RegionAssignment;
248 param[5] = 0;
249 param[6] = 0;
250 param[7] = 0;
251 param[8] = 0;
252 param[9] = 0;
253
254 if (this->MyId == 0)
255 {
256 this->SubGroup->Broadcast(param, 10, 0);
257 return;
258 }
259
260 this->SubGroup->Broadcast(param0, 10, 0);
261
262 int diff = 0;
263
264 for (int i = 0; i < 10; i++)
265 {
266 if (param0[i] != param[i])
267 {
268 diff = 1;
269 break;
270 }
271 }
272 if (diff)
273 {
274 VTKWARNING("Changing my runtime parameters to match process 0");
275
276 this->ValidDirections = param0[0];
277 this->SetMinCells(param0[1]);
278 this->SetNumberOfRegionsOrLess(param0[2]);
279 this->SetNumberOfRegionsOrMore(param0[3]);
280 this->RegionAssignment = param0[4];
281 }
282}
283
284#define BoundsToMinMax(bounds, min, max) \
285 do \

Callers 1

BuildLocatorMethod · 0.95

Calls 1

BroadcastMethod · 0.45

Tested by

no test coverage detected