------------------------------------------------------------------------------
| 1522 | |
| 1523 | //------------------------------------------------------------------------------ |
| 1524 | int 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 | //------------------------------------------------------------------------------ |
| 1560 | int vtkCommunicator::ReduceVoidArray(const void* sendBuffer, void* recvBuffer, vtkIdType length, |
no test coverage detected