#include <cstdint>
#include <vector>
Go to the source code of this file.
|
template<typename T > |
void | BitonicMerge (sort_direction aDir, typename std::vector< T >::iterator &aDataStart, typename std::vector< T >::iterator &aDataEnd) |
|
template<typename T > |
void | BitonicSort (sort_direction aDir, typename std::vector< T >::iterator &aDataStart, typename std::vector< T >::iterator &aDataEnd) |
|
template<typename T >
void BitonicMerge |
( |
sort_direction |
aDir, |
|
|
typename std::vector< T >::iterator & |
aDataStart, |
|
|
typename std::vector< T >::iterator & |
aDataEnd |
|
) |
| |
Definition at line 48 of file BitonicSort.h.
References std::swap(), and up.
53 uint32_t lSize( aDataEnd - aDataStart );
57 while (lPower2<lSize) lPower2<<=1;
59 typename std::vector<T>::iterator lMidpoint( aDataStart + (lPower2>>1) );
60 typename std::vector<T>::iterator lFirst( aDataStart );
61 typename std::vector<T>::iterator lSecond( lMidpoint );
63 for( ; lSecond != aDataEnd ; ++lFirst , ++lSecond ){
64 if( ( (*lFirst) > (*lSecond) ) == (aDir ==
up) ) {
69 BitonicMerge<T> ( aDir, aDataStart , lMidpoint );
70 BitonicMerge<T> ( aDir, lMidpoint , aDataEnd );
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
template<typename T >
void BitonicSort |
( |
sort_direction |
aDir, |
|
|
typename std::vector< T >::iterator & |
aDataStart, |
|
|
typename std::vector< T >::iterator & |
aDataEnd |
|
) |
| |
Definition at line 26 of file BitonicSort.h.
References down, and up.
31 uint32_t lSize( aDataEnd - aDataStart );
33 typename std::vector<T>::iterator lMidpoint( aDataStart+(lSize>>1) );
36 BitonicSort<T> (
up, aDataStart , lMidpoint );
37 BitonicSort<T> (
down, lMidpoint , aDataEnd );
39 BitonicSort<T> (
down, aDataStart , lMidpoint );
40 BitonicSort<T> (
up, lMidpoint , aDataEnd );
42 BitonicMerge<T> (aDir, aDataStart , aDataEnd );