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

Method AllReduce

Parallel/Core/vtkCommunicator.cxx:1661–1677  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1659
1660//------------------------------------------------------------------------------
1661int vtkCommunicator::AllReduce(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int operation)
1662{
1663 int type = sendBuffer->GetDataType();
1664 int components = sendBuffer->GetNumberOfComponents();
1665 vtkIdType tuples = sendBuffer->GetNumberOfTuples();
1666
1667 if (type != recvBuffer->GetDataType())
1668 {
1669 vtkErrorMacro(<< "Send and receive types do not match.");
1670 return 0;
1671 }
1672 recvBuffer->SetNumberOfComponents(components);
1673 recvBuffer->SetNumberOfTuples(tuples);
1674
1675 return this->AllReduceVoidArray(sendBuffer->GetVoidPointer(0), recvBuffer->GetVoidPointer(0),
1676 components * tuples, type, operation);
1677}
1678
1679//------------------------------------------------------------------------------
1680int vtkCommunicator::AllReduce(

Callers 1

AllReduceFunction · 0.45

Calls 7

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

Tested by

no test coverage detected