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

Method ReduceVoidArray

Parallel/Core/vtkCommunicator.cxx:1524–1557  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1522
1523//------------------------------------------------------------------------------
1524int vtkCommunicator::ReduceVoidArray(const void* sendBuffer, void* recvBuffer, vtkIdType length,
1525 int type, int operation, int destProcessId)
1526{
1527#define OP_CASE(id, opclass) \
1528 case id: \
1529 opClass = new vtkCommunicator##opclass##Class; \
1530 break
1531
1532 vtkCommunicator::Operation* opClass = nullptr;
1533
1534 switch (operation)
1535 {
1536 OP_CASE(MAX_OP, Max);
1537 OP_CASE(MIN_OP, Min);
1538 OP_CASE(SUM_OP, Sum);
1539 OP_CASE(PRODUCT_OP, Product);
1540 OP_CASE(LOGICAL_AND_OP, LogicalAnd);
1541 OP_CASE(BITWISE_AND_OP, BitwiseAnd);
1542 OP_CASE(LOGICAL_OR_OP, LogicalOr);
1543 OP_CASE(BITWISE_OR_OP, BitwiseOr);
1544 OP_CASE(LOGICAL_XOR_OP, LogicalXor);
1545 OP_CASE(BITWISE_XOR_OP, BitwiseXor);
1546 default:
1547 vtkWarningMacro(<< "Operation number " << operation << " not supported.");
1548 return 0;
1549 }
1550
1551 int retVal = this->ReduceVoidArray(sendBuffer, recvBuffer, length, type, opClass, destProcessId);
1552 delete opClass;
1553
1554 return retVal;
1555
1556#undef OP_CASE
1557}
1558
1559//------------------------------------------------------------------------------
1560int vtkCommunicator::ReduceVoidArray(const void* sendBuffer, void* recvBuffer, vtkIdType length,

Callers 4

ReduceMethod · 0.95
AllReduceVoidArrayMethod · 0.95
ReduceFunction · 0.45
OptimizeBoundingBoxMethod · 0.45

Calls 4

FunctionMethod · 0.80
copyFunction · 0.50
ReceiveVoidArrayMethod · 0.45
SendVoidArrayMethod · 0.45

Tested by

no test coverage detected