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

Method GetDataBounds

Filters/Parallel/vtkPKdTree.cxx:1884–1917  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1882 }
1883}
1884void vtkPKdTree::GetDataBounds(int L, int K, int R, float globalBounds[12])
1885{
1886 float localMinLeft[3]; // Left region is L through K-1
1887 float localMaxLeft[3];
1888 float globalMinLeft[3];
1889 float globalMaxLeft[3];
1890 float localMinRight[3]; // Right region is K through R
1891 float localMaxRight[3];
1892 float globalMinRight[3];
1893 float globalMaxRight[3];
1894
1895 this->GetLocalMinMax(L, K - 1, this->MyId, localMinLeft, localMaxLeft);
1896
1897 this->GetLocalMinMax(K, R, this->MyId, localMinRight, localMaxRight);
1898
1899 this->SubGroup->ReduceMin(localMinLeft, globalMinLeft, 3, 0);
1900 this->SubGroup->Broadcast(globalMinLeft, 3, 0);
1901
1902 this->SubGroup->ReduceMax(localMaxLeft, globalMaxLeft, 3, 0);
1903 this->SubGroup->Broadcast(globalMaxLeft, 3, 0);
1904
1905 this->SubGroup->ReduceMin(localMinRight, globalMinRight, 3, 0);
1906 this->SubGroup->Broadcast(globalMinRight, 3, 0);
1907
1908 this->SubGroup->ReduceMax(localMaxRight, globalMaxRight, 3, 0);
1909 this->SubGroup->Broadcast(globalMaxRight, 3, 0);
1910
1911 float* left = globalBounds;
1912 float* right = globalBounds + 6;
1913
1914 MinMaxToBounds(left, globalMinLeft, globalMaxLeft);
1915
1916 MinMaxToBounds(right, globalMinRight, globalMaxRight);
1917}
1918
1919//------------------------------------------------------------------------------
1920// Complete the tree - Different nodes of tree were computed by different

Callers 1

DivideRegionMethod · 0.95

Calls 2

GetLocalMinMaxMethod · 0.95
BroadcastMethod · 0.45

Tested by

no test coverage detected