| 1904 | |
| 1905 | template<int codepath> |
| 1906 | static void boxPruningKernel( PxU32 nb0, PxU32 nb1, |
| 1907 | const SIMD_AABB_X4* PX_RESTRICT boxes0_X, const SIMD_AABB_X4* PX_RESTRICT boxes1_X, |
| 1908 | const SIMD_AABB_YZ4* PX_RESTRICT boxes0_YZ, const SIMD_AABB_YZ4* PX_RESTRICT boxes1_YZ, |
| 1909 | const ABP_Index* PX_RESTRICT inToOut0, const ABP_Index* PX_RESTRICT inToOut1, |
| 1910 | ABP_PairManager* PX_RESTRICT pairManager, const ABPEntry* PX_RESTRICT objects) |
| 1911 | { |
| 1912 | pairManager->mInToOut0 = inToOut0; |
| 1913 | pairManager->mInToOut1 = inToOut1; |
| 1914 | pairManager->mObjects = objects; |
| 1915 | |
| 1916 | PxU32 index0 = 0; |
| 1917 | PxU32 runningIndex1 = 0; |
| 1918 | |
| 1919 | while(runningIndex1<nb1 && index0<nb0) |
| 1920 | { |
| 1921 | const SIMD_AABB_X4& box0_X = boxes0_X[index0]; |
| 1922 | const PosXType2 maxLimit = box0_X.mMaxX; |
| 1923 | |
| 1924 | const PosXType2 minLimit = box0_X.mMinX; |
| 1925 | if(!codepath) |
| 1926 | { |
| 1927 | while(boxes1_X[runningIndex1].mMinX<minLimit) |
| 1928 | runningIndex1++; |
| 1929 | } |
| 1930 | else |
| 1931 | { |
| 1932 | while(boxes1_X[runningIndex1].mMinX<=minLimit) |
| 1933 | runningIndex1++; |
| 1934 | } |
| 1935 | |
| 1936 | const SIMD_AABB_YZ4& box0 = boxes0_YZ[index0]; |
| 1937 | SIMD_OVERLAP_PRELOAD_BOX0 |
| 1938 | |
| 1939 | if(gUseRegularBPKernel) |
| 1940 | { |
| 1941 | PxU32 index1 = runningIndex1; |
| 1942 | |
| 1943 | while(boxes1_X[index1].mMinX<=maxLimit) |
| 1944 | { |
| 1945 | ABP_OVERLAP_TEST(boxes1_YZ[index1]) |
| 1946 | { |
| 1947 | outputPair(*pairManager, index0, index1); |
| 1948 | } |
| 1949 | index1++; |
| 1950 | } |
| 1951 | } |
| 1952 | else |
| 1953 | { |
| 1954 | PxU32 Offset = 0; |
| 1955 | const char* const CurrentBoxListYZ = reinterpret_cast<const char*>(&boxes1_YZ[runningIndex1]); |
| 1956 | const char* const CurrentBoxListX = reinterpret_cast<const char*>(&boxes1_X[runningIndex1]); |
| 1957 | |
| 1958 | if(!gUnrollLoop) |
| 1959 | { |
| 1960 | while(*reinterpret_cast<const PosXType2*>(CurrentBoxListX + Offset)<=maxLimit) |
| 1961 | { |
| 1962 | const float* box = reinterpret_cast<const float*>(CurrentBoxListYZ + Offset*2); |
| 1963 | #ifdef ABP_SIMD_OVERLAP |
nothing calls this directly
no test coverage detected