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

Method Reduce

Parallel/Core/vtkCommunicator.cxx:1599–1616  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1597
1598//------------------------------------------------------------------------------
1599int vtkCommunicator::Reduce(
1600 vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int operation, int destProcessId)
1601{
1602 int type = sendBuffer->GetDataType();
1603 int components = sendBuffer->GetNumberOfComponents();
1604 vtkIdType tuples = sendBuffer->GetNumberOfTuples();
1605
1606 if (type != recvBuffer->GetDataType())
1607 {
1608 vtkErrorMacro(<< "Send and receive types do not match.");
1609 return 0;
1610 }
1611 recvBuffer->SetNumberOfComponents(components);
1612 recvBuffer->SetNumberOfTuples(tuples);
1613
1614 return this->ReduceVoidArray(sendBuffer->GetVoidPointer(0), recvBuffer->GetVoidPointer(0),
1615 components * tuples, type, operation, destProcessId);
1616}
1617
1618//------------------------------------------------------------------------------
1619int vtkCommunicator::Reduce(

Callers 3

ReduceFunction · 0.45
CheckSuccessFunction · 0.45
ExerciseTypeFunction · 0.45

Calls 7

ReduceVoidArrayMethod · 0.95
GetDataTypeMethod · 0.45
GetNumberOfComponentsMethod · 0.45
GetNumberOfTuplesMethod · 0.45
SetNumberOfComponentsMethod · 0.45
SetNumberOfTuplesMethod · 0.45
GetVoidPointerMethod · 0.45

Tested by 2

CheckSuccessFunction · 0.36
ExerciseTypeFunction · 0.36