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 38 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length one and one
Definition at line 45 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length one and two
Definition at line 52 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length two and one
Definition at line 60 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length two and two
Definition at line 68 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length two and three
Definition at line 78 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length three and two
Definition at line 88 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length three and three
Definition at line 98 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length three and four
Definition at line 108 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length four and three
Definition at line 118 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length four and four
Definition at line 128 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length four and five
Definition at line 139 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length five and five
Definition at line 150 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length five and six
Definition at line 161 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length six and six
Definition at line 172 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length six and seven
Definition at line 184 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length seven and seven
Definition at line 196 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length seven and eight
Definition at line 208 of file bose_nelson_parameter.hpp.
|
inlinestatic |
merge network for element arrays length eight and eight
Definition at line 220 of file bose_nelson_parameter.hpp.
|
static |
Call Bose-Network sorting network for up to sixteen elements with given comparison method.
Definition at line 410 of file bose_nelson_parameter.hpp.
|
inlinestatic |
Bose-Nelson sorting network for ten elements.
Definition at line 315 of file bose_nelson_parameter.hpp.
|
inlinestatic |
Bose-Nelson sorting network for eleven elements.
Definition at line 327 of file bose_nelson_parameter.hpp.
|
inlinestatic |
Bose-Nelson sorting network for twelve elements.
Definition at line 340 of file bose_nelson_parameter.hpp.
|
inlinestatic |
Bose-Nelson sorting network for thirteen elements.
Definition at line 353 of file bose_nelson_parameter.hpp.
|
inlinestatic |
Bose-Nelson sorting network for fourteen elements.
Definition at line 366 of file bose_nelson_parameter.hpp.
|
inlinestatic |
Bose-Nelson sorting network for fifteen elements.
Definition at line 379 of file bose_nelson_parameter.hpp.
|
inlinestatic |
Bose-Nelson sorting network for sixteen elements.
Definition at line 393 of file bose_nelson_parameter.hpp.
|
inlinestatic |
Bose-Nelson sorting network for two elements.
Definition at line 235 of file bose_nelson_parameter.hpp.
|
inlinestatic |
Bose-Nelson sorting network for three elements.
Definition at line 242 of file bose_nelson_parameter.hpp.
|
inlinestatic |
Bose-Nelson sorting network for four elements.
Definition at line 250 of file bose_nelson_parameter.hpp.
|
inlinestatic |
Bose-Nelson sorting network for five elements.
Definition at line 260 of file bose_nelson_parameter.hpp.
|
inlinestatic |
Bose-Nelson sorting network for six elements.
Definition at line 270 of file bose_nelson_parameter.hpp.
|
inlinestatic |
Bose-Nelson sorting network for seven elements.
Definition at line 280 of file bose_nelson_parameter.hpp.
|
inlinestatic |
Bose-Nelson sorting network for eight elements.
Definition at line 291 of file bose_nelson_parameter.hpp.
|
inlinestatic |
Bose-Nelson sorting network for nine elements.
Definition at line 303 of file bose_nelson_parameter.hpp.