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

Method Scatter

Parallel/Core/vtkCommunicator.cxx:1380–1403  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1378
1379//------------------------------------------------------------------------------
1380int vtkCommunicator::Scatter(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int srcProcessId)
1381{
1382 int type = recvBuffer->GetDataType();
1383 const void* sb = nullptr;
1384 void* rb = recvBuffer->GetVoidPointer(0);
1385 int numComponents = recvBuffer->GetNumberOfComponents();
1386 vtkIdType numTuples = recvBuffer->GetNumberOfTuples();
1387 if (this->LocalProcessId == srcProcessId)
1388 {
1389 if (type != sendBuffer->GetDataType())
1390 {
1391 vtkErrorMacro(<< "Data type mismatch.");
1392 return 0;
1393 }
1394 if (sendBuffer->GetNumberOfComponents() * sendBuffer->GetNumberOfTuples() <
1395 numComponents * numTuples)
1396 {
1397 vtkErrorMacro(<< "Send buffer not large enough for requested data.");
1398 return 0;
1399 }
1400 sb = sendBuffer->GetVoidPointer(0);
1401 }
1402 return this->ScatterVoidArray(sb, rb, numComponents * numTuples, type, srcProcessId);
1403}
1404
1405//------------------------------------------------------------------------------
1406int vtkCommunicator::ScatterVVoidArray(const void* sendBuffer, void* recvBuffer,

Callers 3

ScatterFunction · 0.45
ExerciseTypeFunction · 0.45
InternalScatterMethod · 0.45

Calls 5

ScatterVoidArrayMethod · 0.95
GetDataTypeMethod · 0.45
GetVoidPointerMethod · 0.45
GetNumberOfComponentsMethod · 0.45
GetNumberOfTuplesMethod · 0.45

Tested by 1

ExerciseTypeFunction · 0.36