| 101 | } |
| 102 | |
| 103 | bool vtkUnstructuredGridToCellGrid::TranscribeQuery::SumOutputCounts() |
| 104 | { |
| 105 | bool allCellsClaimed = true; |
| 106 | this->OutputAllocations.clear(); |
| 107 | for (const auto& entry : this->CellTypeMap) |
| 108 | { |
| 109 | if (entry.second.NumberOfCells > 0) |
| 110 | { |
| 111 | if (entry.second.CellType.IsValid()) |
| 112 | { |
| 113 | this->OutputAllocations[entry.second.CellType] += entry.second.NumberOfCells; |
| 114 | // clang-format off |
| 115 | vtkLogF(TRACE, "Entry %zu += %lld for '%s' (%x)", |
| 116 | this->OutputAllocations.size(), |
| 117 | static_cast<long long>(entry.second.NumberOfCells), |
| 118 | entry.second.CellType.Data().c_str(), |
| 119 | entry.second.CellType.GetId()); |
| 120 | // clang-format on |
| 121 | } |
| 122 | else |
| 123 | { |
| 124 | // clang-format off |
| 125 | vtkLogF(TRACE, "No allocations for %llu cells of type %lu", |
| 126 | static_cast<unsigned long long>(entry.second.NumberOfCells), |
| 127 | static_cast<unsigned long>(entry.first)); |
| 128 | // clang-format on |
| 129 | allCellsClaimed = false; |
| 130 | } |
| 131 | } |
| 132 | } |
| 133 | vtkLogF(TRACE, "%zu types with allocations", this->OutputAllocations.size()); |
| 134 | return allCellsClaimed; |
| 135 | } |
| 136 | |
| 137 | void vtkUnstructuredGridToCellGrid::TranscribeQuery::AddCellAttributes( |
| 138 | vtkDataSetAttributes* attributes) |