tlx
|
Implementation of Bose-Nelson sorting networks for up to sixteen elements processing parameters instead of an array. More...
Typedefs | |
template<typename ValueType > | |
using | DefaultCSwap = CS_IfSwap< std::less< ValueType > > |
default conditional swap implementation More... | |
Functions | |
template<typename ValueType , typename CSwap > | |
static void | merge_1_1 (ValueType &a0, ValueType &b0, CSwap cswap) |
merge network for element arrays length one and one More... | |
template<typename ValueType , typename CSwap > | |
static void | merge_1_2 (ValueType &a0, ValueType &b0, ValueType &b1, CSwap cswap) |
merge network for element arrays length one and two More... | |
template<typename ValueType , typename CSwap > | |
static void | merge_2_1 (ValueType &a0, ValueType &a1, ValueType &b0, CSwap cswap) |
merge network for element arrays length two and one More... | |
template<typename ValueType , typename CSwap > | |
static void | merge_2_2 (ValueType &a0, ValueType &a1, ValueType &b0, ValueType &b1, CSwap cswap) |
merge network for element arrays length two and two More... | |
template<typename ValueType , typename CSwap > | |
static void | merge_2_3 (ValueType &a0, ValueType &a1, ValueType &b0, ValueType &b1, ValueType &b2, CSwap cswap) |
merge network for element arrays length two and three More... | |
template<typename ValueType , typename CSwap > | |
static void | merge_3_2 (ValueType &a0, ValueType &a1, ValueType &a2, ValueType &b0, ValueType &b1, CSwap cswap) |
merge network for element arrays length three and two More... | |
template<typename ValueType , typename CSwap > | |
static void | merge_3_3 (ValueType &a0, ValueType &a1, ValueType &a2, ValueType &b0, ValueType &b1, ValueType &b2, CSwap cswap) |
merge network for element arrays length three and three More... | |
template<typename ValueType , typename CSwap > | |
static void | merge_3_4 (ValueType &a0, ValueType &a1, ValueType &a2, ValueType &b0, ValueType &b1, ValueType &b2, ValueType &b3, CSwap cswap) |
merge network for element arrays length three and four More... | |
template<typename ValueType , typename CSwap > | |
static void | merge_4_3 (ValueType &a0, ValueType &a1, ValueType &a2, ValueType &a3, ValueType &b0, ValueType &b1, ValueType &b2, CSwap cswap) |
merge network for element arrays length four and three More... | |
template<typename ValueType , typename CSwap > | |
static void | merge_4_4 (ValueType &a0, ValueType &a1, ValueType &a2, ValueType &a3, ValueType &b0, ValueType &b1, ValueType &b2, ValueType &b3, CSwap cswap) |
merge network for element arrays length four and four More... | |
template<typename ValueType , typename CSwap > | |
static void | merge_4_5 (ValueType &a0, ValueType &a1, ValueType &a2, ValueType &a3, ValueType &b0, ValueType &b1, ValueType &b2, ValueType &b3, ValueType &b4, CSwap cswap) |
merge network for element arrays length four and five More... | |
template<typename ValueType , typename CSwap > | |
static void | merge_5_5 (ValueType &a0, ValueType &a1, ValueType &a2, ValueType &a3, ValueType &a4, ValueType &b0, ValueType &b1, ValueType &b2, ValueType &b3, ValueType &b4, CSwap cswap) |
merge network for element arrays length five and five More... | |
template<typename ValueType , typename CSwap > | |
static void | merge_5_6 (ValueType &a0, ValueType &a1, ValueType &a2, ValueType &a3, ValueType &a4, ValueType &b0, ValueType &b1, ValueType &b2, ValueType &b3, ValueType &b4, ValueType &b5, CSwap cswap) |
merge network for element arrays length five and six More... | |
template<typename ValueType , typename CSwap > | |
static void | merge_6_6 (ValueType &a0, ValueType &a1, ValueType &a2, ValueType &a3, ValueType &a4, ValueType &a5, ValueType &b0, ValueType &b1, ValueType &b2, ValueType &b3, ValueType &b4, ValueType &b5, CSwap cswap) |
merge network for element arrays length six and six More... | |
template<typename ValueType , typename CSwap > | |
static void | merge_6_7 (ValueType &a0, ValueType &a1, ValueType &a2, ValueType &a3, ValueType &a4, ValueType &a5, ValueType &b0, ValueType &b1, ValueType &b2, ValueType &b3, ValueType &b4, ValueType &b5, ValueType &b6, CSwap cswap) |
merge network for element arrays length six and seven More... | |
template<typename ValueType , typename CSwap > | |
static void | merge_7_7 (ValueType &a0, ValueType &a1, ValueType &a2, ValueType &a3, ValueType &a4, ValueType &a5, ValueType &a6, ValueType &b0, ValueType &b1, ValueType &b2, ValueType &b3, ValueType &b4, ValueType &b5, ValueType &b6, CSwap cswap) |
merge network for element arrays length seven and seven More... | |
template<typename ValueType , typename CSwap > | |
static void | merge_7_8 (ValueType &a0, ValueType &a1, ValueType &a2, ValueType &a3, ValueType &a4, ValueType &a5, ValueType &a6, ValueType &b0, ValueType &b1, ValueType &b2, ValueType &b3, ValueType &b4, ValueType &b5, ValueType &b6, ValueType &b7, CSwap cswap) |
merge network for element arrays length seven and eight More... | |
template<typename ValueType , typename CSwap > | |
static void | merge_8_8 (ValueType &a0, ValueType &a1, ValueType &a2, ValueType &a3, ValueType &a4, ValueType &a5, ValueType &a6, ValueType &a7, ValueType &b0, ValueType &b1, ValueType &b2, ValueType &b3, ValueType &b4, ValueType &b5, ValueType &b6, ValueType &b7, CSwap cswap) |
merge network for element arrays length eight and eight More... | |
template<typename ValueType , typename CSwap = DefaultCSwap<ValueType>> | |
static void | sort2 (ValueType &x0, ValueType &x1, CSwap cswap=CSwap()) |
Bose-Nelson sorting network for two elements. More... | |
template<typename ValueType , typename CSwap = DefaultCSwap<ValueType>> | |
static void | sort3 (ValueType &x0, ValueType &x1, ValueType &x2, CSwap cswap=CSwap()) |
Bose-Nelson sorting network for three elements. More... | |
template<typename ValueType , typename CSwap = DefaultCSwap<ValueType>> | |
static void | sort4 (ValueType &x0, ValueType &x1, ValueType &x2, ValueType &x3, CSwap cswap=CSwap()) |
Bose-Nelson sorting network for four elements. More... | |
template<typename ValueType , typename CSwap = DefaultCSwap<ValueType>> | |
static void | sort5 (ValueType &x0, ValueType &x1, ValueType &x2, ValueType &x3, ValueType &x4, CSwap cswap=CSwap()) |
Bose-Nelson sorting network for five elements. More... | |
template<typename ValueType , typename CSwap = DefaultCSwap<ValueType>> | |
static void | sort6 (ValueType &x0, ValueType &x1, ValueType &x2, ValueType &x3, ValueType &x4, ValueType &x5, CSwap cswap=CSwap()) |
Bose-Nelson sorting network for six elements. More... | |
template<typename ValueType , typename CSwap = DefaultCSwap<ValueType>> | |
static void | sort7 (ValueType &x0, ValueType &x1, ValueType &x2, ValueType &x3, ValueType &x4, ValueType &x5, ValueType &x6, CSwap cswap=CSwap()) |
Bose-Nelson sorting network for seven elements. More... | |
template<typename ValueType , typename CSwap = DefaultCSwap<ValueType>> | |
static void | sort8 (ValueType &x0, ValueType &x1, ValueType &x2, ValueType &x3, ValueType &x4, ValueType &x5, ValueType &x6, ValueType &x7, CSwap cswap=CSwap()) |
Bose-Nelson sorting network for eight elements. More... | |
template<typename ValueType , typename CSwap = DefaultCSwap<ValueType>> | |
static void | sort9 (ValueType &x0, ValueType &x1, ValueType &x2, ValueType &x3, ValueType &x4, ValueType &x5, ValueType &x6, ValueType &x7, ValueType &x8, CSwap cswap=CSwap()) |
Bose-Nelson sorting network for nine elements. More... | |
template<typename ValueType , typename CSwap = DefaultCSwap<ValueType>> | |
static void | sort10 (ValueType &x0, ValueType &x1, ValueType &x2, ValueType &x3, ValueType &x4, ValueType &x5, ValueType &x6, ValueType &x7, ValueType &x8, ValueType &x9, CSwap cswap=CSwap()) |
Bose-Nelson sorting network for ten elements. More... | |
template<typename ValueType , typename CSwap = DefaultCSwap<ValueType>> | |
static void | sort11 (ValueType &x0, ValueType &x1, ValueType &x2, ValueType &x3, ValueType &x4, ValueType &x5, ValueType &x6, ValueType &x7, ValueType &x8, ValueType &x9, ValueType &x10, CSwap cswap=CSwap()) |
Bose-Nelson sorting network for eleven elements. More... | |
template<typename ValueType , typename CSwap = DefaultCSwap<ValueType>> | |
static void | sort12 (ValueType &x0, ValueType &x1, ValueType &x2, ValueType &x3, ValueType &x4, ValueType &x5, ValueType &x6, ValueType &x7, ValueType &x8, ValueType &x9, ValueType &x10, ValueType &x11, CSwap cswap=CSwap()) |
Bose-Nelson sorting network for twelve elements. More... | |
template<typename ValueType , typename CSwap = DefaultCSwap<ValueType>> | |
static void | sort13 (ValueType &x0, ValueType &x1, ValueType &x2, ValueType &x3, ValueType &x4, ValueType &x5, ValueType &x6, ValueType &x7, ValueType &x8, ValueType &x9, ValueType &x10, ValueType &x11, ValueType &x12, CSwap cswap=CSwap()) |
Bose-Nelson sorting network for thirteen elements. More... | |
template<typename ValueType , typename CSwap = DefaultCSwap<ValueType>> | |
static void | sort14 (ValueType &x0, ValueType &x1, ValueType &x2, ValueType &x3, ValueType &x4, ValueType &x5, ValueType &x6, ValueType &x7, ValueType &x8, ValueType &x9, ValueType &x10, ValueType &x11, ValueType &x12, ValueType &x13, CSwap cswap=CSwap()) |
Bose-Nelson sorting network for fourteen elements. More... | |
template<typename ValueType , typename CSwap = DefaultCSwap<ValueType>> | |
static void | sort15 (ValueType &x0, ValueType &x1, ValueType &x2, ValueType &x3, ValueType &x4, ValueType &x5, ValueType &x6, ValueType &x7, ValueType &x8, ValueType &x9, ValueType &x10, ValueType &x11, ValueType &x12, ValueType &x13, ValueType &x14, CSwap cswap=CSwap()) |
Bose-Nelson sorting network for fifteen elements. More... | |
template<typename ValueType , typename CSwap = DefaultCSwap<ValueType>> | |
static void | sort16 (ValueType &x0, ValueType &x1, ValueType &x2, ValueType &x3, ValueType &x4, ValueType &x5, ValueType &x6, ValueType &x7, ValueType &x8, ValueType &x9, ValueType &x10, ValueType &x11, ValueType &x12, ValueType &x13, ValueType &x14, ValueType &x15, CSwap cswap=CSwap()) |
Bose-Nelson sorting network for sixteen elements. More... | |
template<typename Iterator , typename Comparator = std::less<typename std::iterator_traits<Iterator>::value_type>> | |
static void | sort (Iterator a, Iterator b, Comparator cmp=Comparator()) |
Call Bose-Network sorting network for up to sixteen elements with given comparison method. More... | |
Implementation of Bose-Nelson sorting networks for up to sixteen elements processing parameters instead of an array.
using DefaultCSwap = CS_IfSwap<std::less<ValueType> > |
default conditional swap implementation
Definition at line 62 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length one and one
Definition at line 69 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length one and two
Definition at line 76 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length two and one
Definition at line 84 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length two and two
Definition at line 92 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length two and three
Definition at line 102 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length three and two
Definition at line 112 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length three and three
Definition at line 122 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length three and four
Definition at line 132 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length four and three
Definition at line 142 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length four and four
Definition at line 152 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length four and five
Definition at line 163 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length five and five
Definition at line 174 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length five and six
Definition at line 185 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length six and six
Definition at line 196 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length six and seven
Definition at line 208 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length seven and seven
Definition at line 220 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length seven and eight
Definition at line 232 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length eight and eight
Definition at line 244 of file bose_nelson_parameter.hpp.
|
static |
Call Bose-Network sorting network for up to sixteen elements with given comparison method.
Definition at line 434 of file bose_nelson_parameter.hpp.
|
inlinestatic |
Bose-Nelson sorting network for ten elements.
Definition at line 339 of file bose_nelson_parameter.hpp.
|
inlinestatic |
Bose-Nelson sorting network for eleven elements.
Definition at line 351 of file bose_nelson_parameter.hpp.
|
inlinestatic |
Bose-Nelson sorting network for twelve elements.
Definition at line 364 of file bose_nelson_parameter.hpp.
|
inlinestatic |
Bose-Nelson sorting network for thirteen elements.
Definition at line 377 of file bose_nelson_parameter.hpp.
|
inlinestatic |
Bose-Nelson sorting network for fourteen elements.
Definition at line 390 of file bose_nelson_parameter.hpp.
|
inlinestatic |
Bose-Nelson sorting network for fifteen elements.
Definition at line 403 of file bose_nelson_parameter.hpp.
|
inlinestatic |
Bose-Nelson sorting network for sixteen elements.
Definition at line 417 of file bose_nelson_parameter.hpp.
|
inlinestatic |
Bose-Nelson sorting network for two elements.
Definition at line 259 of file bose_nelson_parameter.hpp.
|
inlinestatic |
Bose-Nelson sorting network for three elements.
Definition at line 266 of file bose_nelson_parameter.hpp.
|
inlinestatic |
Bose-Nelson sorting network for four elements.
Definition at line 274 of file bose_nelson_parameter.hpp.
|
inlinestatic |
Bose-Nelson sorting network for five elements.
Definition at line 284 of file bose_nelson_parameter.hpp.
|
inlinestatic |
Bose-Nelson sorting network for six elements.
Definition at line 294 of file bose_nelson_parameter.hpp.
|
inlinestatic |
Bose-Nelson sorting network for seven elements.
Definition at line 304 of file bose_nelson_parameter.hpp.
|
inlinestatic |
Bose-Nelson sorting network for eight elements.
Definition at line 315 of file bose_nelson_parameter.hpp.
|
inlinestatic |
Bose-Nelson sorting network for nine elements.
Definition at line 327 of file bose_nelson_parameter.hpp.