------------------------------------------------------------------------------
| 89 | |
| 90 | //------------------------------------------------------------------------------ |
| 91 | vtkIdType vtkDistributedGraphHelper::GetEdgeOwner(vtkIdType e_id) const |
| 92 | { |
| 93 | vtkIdType owner = e_id; |
| 94 | int numProcs = this->Graph->GetInformation()->Get(vtkDataObject::DATA_NUMBER_OF_PIECES()); |
| 95 | |
| 96 | if (numProcs > 1) |
| 97 | { |
| 98 | if (e_id & this->signBitMask) |
| 99 | { |
| 100 | owner ^= this->signBitMask; // remove sign bit |
| 101 | vtkIdType tmp = owner >> this->indexBits; // so can right-shift |
| 102 | owner = tmp | this->highBitShiftMask; // and append sign bit back |
| 103 | } |
| 104 | else |
| 105 | { |
| 106 | owner = e_id >> this->indexBits; |
| 107 | } |
| 108 | } |
| 109 | else // numProcs = 1 |
| 110 | { |
| 111 | owner = 0; |
| 112 | } |
| 113 | |
| 114 | return owner; |
| 115 | } |
| 116 | |
| 117 | //------------------------------------------------------------------------------ |
| 118 | vtkIdType vtkDistributedGraphHelper::GetEdgeIndex(vtkIdType e_id) const |
no test coverage detected