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

Method Gather

Parallel/Core/vtkCommunicator.cxx:953–972  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

951
952//------------------------------------------------------------------------------
953int vtkCommunicator::Gather(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int destProcessId)
954{
955 int type = sendBuffer->GetDataType();
956 const void* sb = sendBuffer->GetVoidPointer(0);
957 void* rb = nullptr;
958 int numComponents = sendBuffer->GetNumberOfComponents();
959 vtkIdType numTuples = sendBuffer->GetNumberOfTuples();
960 if (this->LocalProcessId == destProcessId)
961 {
962 if (type != recvBuffer->GetDataType())
963 {
964 vtkErrorMacro(<< "Data type mismatch.");
965 return 0;
966 }
967 recvBuffer->SetNumberOfComponents(numComponents);
968 recvBuffer->SetNumberOfTuples(numTuples * this->NumberOfProcesses);
969 rb = recvBuffer->GetVoidPointer(0);
970 }
971 return this->GatherVoidArray(sb, rb, numComponents * numTuples, type, destProcessId);
972}
973
974//------------------------------------------------------------------------------
975int vtkCommunicator::Gather(vtkDataObject* sendBuffer,

Callers 6

ReduceMethod · 0.45
GatherFunction · 0.45
Process2Function · 0.45
Process1Function · 0.45
ExerciseTypeFunction · 0.45
ExerciseDataObjectFunction · 0.45

Calls 15

GatherVoidArrayMethod · 0.95
GatherVMethod · 0.95
SetRawDataMethod · 0.80
NewFunction · 0.50
GetDataTypeMethod · 0.45
GetVoidPointerMethod · 0.45
GetNumberOfComponentsMethod · 0.45
GetNumberOfTuplesMethod · 0.45
SetNumberOfComponentsMethod · 0.45
SetNumberOfTuplesMethod · 0.45
InitializeMethod · 0.45
resizeMethod · 0.45

Tested by 4

Process2Function · 0.36
Process1Function · 0.36
ExerciseTypeFunction · 0.36
ExerciseDataObjectFunction · 0.36