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

Method AllReduce

Parallel/DIY/vtkDIYUtilities.cxx:205–220  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

203
204//------------------------------------------------------------------------------
205void vtkDIYUtilities::AllReduce(diy::mpi::communicator& comm, vtkBoundingBox& bbox)
206{
207 if (comm.size() > 1)
208 {
209 std::vector<double> local_minpoint(3), local_maxpoint(3);
210 bbox.GetMinPoint(local_minpoint.data());
211 bbox.GetMaxPoint(local_maxpoint.data());
212
213 std::vector<double> global_minpoint(3), global_maxpoint(3);
214 diy::mpi::all_reduce(comm, local_minpoint, global_minpoint, diy::mpi::minimum<float>());
215 diy::mpi::all_reduce(comm, local_maxpoint, global_maxpoint, diy::mpi::maximum<float>());
216
217 bbox.SetMinPoint(global_minpoint.data());
218 bbox.SetMaxPoint(global_maxpoint.data());
219 }
220}
221
222//------------------------------------------------------------------------------
223void vtkDIYUtilities::Save(diy::BinaryBuffer& bb, vtkDataArray* array)

Callers 15

ExerciseTypeFunction · 0.45
RegressionTestMethod · 0.45
TestSourceBoundingBoxFunction · 0.45
SendReceiveParticlesMethod · 0.45
IsPointDataValidMethod · 0.45
LearnMethod · 0.45
ComputeBinExtentsMethod · 0.45
ComputeGlobalSumMethod · 0.45
RequestDataMethod · 0.45
RunParallelConnectivityFunction · 0.45

Calls 7

GetMinPointMethod · 0.80
GetMaxPointMethod · 0.80
SetMinPointMethod · 0.60
SetMaxPointMethod · 0.60
all_reduceFunction · 0.50
sizeMethod · 0.45
dataMethod · 0.45

Tested by 15

ExerciseTypeFunction · 0.36
RegressionTestMethod · 0.36
TestSourceBoundingBoxFunction · 0.36
GetTotalNumberOfNodesFunction · 0.36
TestAverageFunction · 0.36
TestOutputFunction · 0.36
TestDataTypeFunction · 0.36
AllRanksSucceededFunction · 0.36
ValidateDatasetFunction · 0.36
TestCutsFunction · 0.36
ValidateDatasetFunction · 0.36