| 2783 | return 0; |
| 2784 | } |
| 2785 | bool vtkPKdTree::CollectLocalRegionProcessData(std::vector<int>& cellCounts) |
| 2786 | { |
| 2787 | int numRegions = this->GetNumberOfRegions(); |
| 2788 | std::fill(cellCounts.begin(), cellCounts.end(), 0); |
| 2789 | cellCounts.resize(numRegions, 0); |
| 2790 | |
| 2791 | TIMER("Get cell regions"); |
| 2792 | |
| 2793 | int* IDs = this->AllGetRegionContainingCell(); |
| 2794 | |
| 2795 | TIMERDONE("Get cell regions"); |
| 2796 | |
| 2797 | for (int set = 0; set < this->GetNumberOfDataSets(); set++) |
| 2798 | { |
| 2799 | int ncells = this->GetDataSet(set)->GetNumberOfCells(); |
| 2800 | |
| 2801 | TIMER("Increment cell counts"); |
| 2802 | |
| 2803 | for (int i = 0; i < ncells; i++) |
| 2804 | { |
| 2805 | int regionId = IDs[i]; |
| 2806 | |
| 2807 | if ((regionId < 0) || (regionId >= numRegions)) |
| 2808 | { |
| 2809 | VTKERROR("CollectLocalRegionProcessData - corrupt data"); |
| 2810 | cellCounts.clear(); |
| 2811 | return false; |
| 2812 | } |
| 2813 | cellCounts[regionId]++; |
| 2814 | } |
| 2815 | |
| 2816 | IDs += ncells; |
| 2817 | |
| 2818 | TIMERDONE("Increment cell counts"); |
| 2819 | } |
| 2820 | return true; |
| 2821 | } |
| 2822 | void vtkPKdTree::AddEntry(int* list, int len, int id) |
| 2823 | { |
| 2824 | int i = 0; |
no test coverage detected