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

Method AllCheckForFailure

Filters/Parallel/vtkPKdTree.cxx:197–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195//------------------------------------------------------------------------------
196
197int vtkPKdTree::AllCheckForFailure(int rc, const char* where, const char* how)
198{
199 int vote;
200 char errmsg[256];
201
202 if (this->NumProcesses > 1)
203 {
204 this->SubGroup->ReduceSum(&rc, &vote, 1, 0);
205 this->SubGroup->Broadcast(&vote, 1, 0);
206 }
207 else
208 {
209 vote = rc;
210 }
211
212 if (vote)
213 {
214 if (rc)
215 {
216 auto result = vtk::format_to_n(errmsg, sizeof(errmsg), "{:s} on my node ({:s})", how, where);
217 *result.out = '\0';
218 }
219 else
220 {
221 auto result =
222 vtk::format_to_n(errmsg, sizeof(errmsg), "{:s} on a remote node ({:s})", how, where);
223 *result.out = '\0';
224 }
225 VTKWARNING(errmsg);
226
227 return 1;
228 }
229 return 0;
230}
231
232void vtkPKdTree::AllCheckParameters()
233{

Callers 4

DivideRegionMethod · 0.95
CompleteTreeMethod · 0.95

Calls 2

format_to_nFunction · 0.50
BroadcastMethod · 0.45

Tested by

no test coverage detected