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

Function GetGlobalFieldMetaData

Filters/ParallelDIY2/vtkPResampleToImage.cxx:307–330  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

305}
306
307inline void GetGlobalFieldMetaData(
308 diy::mpi::communicator& comm, vtkDataSetAttributes* data, std::vector<FieldMetaData>* metadata)
309{
310 std::vector<FieldMetaData> local;
311 ExtractFieldMetaData(data, &local);
312
313 // find a process that has field meta data information (choose the process with
314 // minimum rank)
315 int rank = !local.empty() ? comm.rank() : comm.size();
316 int source;
317 diy::mpi::all_reduce(comm, rank, source, diy::mpi::minimum<int>());
318
319 if (source < comm.size()) // at least one process has field meta data
320 {
321 diy::MemoryBuffer bb;
322 if (comm.rank() == source)
323 {
324 diy::save(bb, local);
325 bb.reset();
326 }
327 diy::mpi::broadcast(comm, bb.buffer, source);
328 diy::load(bb, *metadata);
329 }
330}
331
332//------------------------------------------------------------------------------
333void Redistribute(

Callers 1

RequestDataMethod · 0.85

Calls 9

ExtractFieldMetaDataFunction · 0.85
all_reduceFunction · 0.50
saveFunction · 0.50
broadcastFunction · 0.50
loadFunction · 0.50
emptyMethod · 0.45
rankMethod · 0.45
sizeMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected