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

Function AllGather

Filters/Parallel/vtkAlignImageDataSetFilter.cxx:19–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17{
18
19vtkVector3d AllGather(const vtkVector3d& spacing, vtkMultiProcessController* controller)
20{
21 vtkVector3d in(spacing);
22 vtkVector3d out = in;
23 controller->AllReduce(in.GetData(), out.GetData(), 3, vtkCommunicator::MAX_OP);
24 for (int cc = 0; cc < 3; ++cc)
25 {
26 in[cc] = (in[cc] == 0 || in[cc] == out[cc]) ? out[cc] : VTK_DOUBLE_MAX;
27 }
28
29 controller->AllReduce(in.GetData(), out.GetData(), 3, vtkCommunicator::MAX_OP);
30 return out;
31}
32
33bool IsSpacingValid(const vtkVector3d& spacing)
34{

Callers 1

ComputeGlobalOriginFunction · 0.70

Calls 2

AllReduceMethod · 0.45
GetDataMethod · 0.45

Tested by

no test coverage detected