diff --git a/include/boost/sort/block_indirect_sort/blk_detail/move_blocks.hpp b/include/boost/sort/block_indirect_sort/blk_detail/move_blocks.hpp index e633e71..5ed8f41 100644 --- a/include/boost/sort/block_indirect_sort/blk_detail/move_blocks.hpp +++ b/include/boost/sort/block_indirect_sort/blk_detail/move_blocks.hpp @@ -203,7 +203,7 @@ ::move_blocks(backbone_t &bkb) : bk(bkb) } bk.exec(counter); } -; + // //------------------------------------------------------------------------- // function : move_sequence diff --git a/include/boost/sort/common/indirect.hpp b/include/boost/sort/common/indirect.hpp index 8664ccc..26ed229 100644 --- a/include/boost/sort/common/indirect.hpp +++ b/include/boost/sort/common/indirect.hpp @@ -79,7 +79,8 @@ void create_index(Iter_t first, Iter_t last, std::vector &index) index.clear(); index.reserve(nelem); for (; first != last; ++first) index.push_back(first); -}; +} + // //----------------------------------------------------------------------------- // function : sort_index @@ -106,7 +107,7 @@ void sort_index(Iter_t global_first, std::vector &index) (size_t(index[pos_in_vector] - global_first)) == pos_in_vector) { ++pos_in_vector; - }; + } if (pos_in_vector == nelem) return; pos_dest = pos_src = pos_in_vector; @@ -121,13 +122,13 @@ void sort_index(Iter_t global_first, std::vector &index) *it_dest = std::move(*it_src); it_dest = it_src; pos_dest = pos_src; - }; + } *it_dest = std::move(Aux); index[pos_dest] = it_dest; ++pos_in_vector; - }; -}; + } +} template > void indirect_sort(func method, Iter_t first, Iter_t last, Compare comp) @@ -141,13 +142,13 @@ void indirect_sort(func method, Iter_t first, Iter_t last, Compare comp) less_ptr_no_null index_comp(comp); method(index.begin(), index.end(), index_comp); sort_index(first, index); -}; +} // //**************************************************************************** -};// End namespace common -};// End namespace sort -};// End namespace boost +}// End namespace common +}// End namespace sort +}// End namespace boost //**************************************************************************** // #endif diff --git a/include/boost/sort/common/merge_block.hpp b/include/boost/sort/common/merge_block.hpp index 1a7eb90..17e3acd 100644 --- a/include/boost/sort/common/merge_block.hpp +++ b/include/boost/sort/common/merge_block.hpp @@ -327,7 +327,7 @@ ::merge_range_pos(it_index itx_first, it_index itx_mid,it_index itx_last) while (itxA != indexA.end()) *(itx_out++) = *(itxA++); }; -}; +} //------------------------------------------------------------------------- // function : move_range_pos_backward @@ -366,7 +366,7 @@ ::move_range_pos_backward(it_index itx_first, it_index itx_last, size_t npos) util::move_backward(it_mid2, it_mid1, rng1.last); util::move_backward(rng1.last, rng1.first, it_mid1); }; -}; +} //------------------------------------------------------------------------- // function : rearrange_with_index /// @brief rearrange the blocks with the relative positions of the index @@ -409,11 +409,11 @@ ::rearrange_with_index(void) index[pos_dest] = pos_dest; ++pos_ini; }; -}; +} //**************************************************************************** -};// End namespace common -};// End namespace sort -};// End namespace boost +}// End namespace common +}// End namespace sort +}// End namespace boost //**************************************************************************** #endif diff --git a/include/boost/sort/common/merge_four.hpp b/include/boost/sort/common/merge_four.hpp index ce3f5e5..50cff80 100644 --- a/include/boost/sort/common/merge_four.hpp +++ b/include/boost/sort/common/merge_four.hpp @@ -57,7 +57,7 @@ inline bool less_range(Iter_t it1, uint32_t pos1, Iter_t it2, uint32_t pos2, { return (comp(*it1, *it2)) ? true : (pos2 < pos1) ? false : not (comp(*it2, *it1)); -}; +} //----------------------------------------------------------------------------- // function : full_merge4 @@ -96,17 +96,17 @@ range full_merge4(const range &rdest, for (uint32_t k = i + 1; k < nrange_input; ++k) { vrange_input[k - 1] = vrange_input[k]; - }; + } --nrange_input; - }; - }; + } + } if (nrange_input == 0) return range1_t(rdest.first, rdest.first); if (nrange_input == 1) return move_forward(rdest, vrange_input[0]); if (nrange_input == 2) { return merge(rdest, vrange_input[0], vrange_input[1], comp); - }; + } //------------------------------------------------------------------------ // Initial sort @@ -122,12 +122,12 @@ range full_merge4(const range &rdest, vrange_input[pos[0]].first, pos[0], comp)) { swap(pos[0], pos[1]); - }; + } if (npos == 4 and less_range(vrange_input[pos[3]].first, pos[3], vrange_input[pos[2]].first, pos[2], comp)) { swap(pos[3], pos[2]); - }; + } if (less_range (vrange_input[pos[2]].first, pos[2], vrange_input[pos[0]].first, pos[0], comp)) { @@ -138,12 +138,12 @@ range full_merge4(const range &rdest, vrange_input[pos[1]].first, pos[1], comp)) { swap(pos[1], pos[3]); - }; + } if (less_range (vrange_input[pos[2]].first, pos[2], vrange_input[pos[1]].first, pos[1], comp)) { swap(pos[1], pos[2]); - }; + } Iter1_t it_dest = rdest.first; while (npos > 2) @@ -173,11 +173,11 @@ range full_merge4(const range &rdest, pos[2], comp)) { swap(pos[2], pos[3]); - }; - }; - }; - }; - }; + } + } + } + } + } range1_t raux1(rdest.first, it_dest), raux2(it_dest, rdest.last); if (pos[0] < pos[1]) @@ -189,8 +189,8 @@ range full_merge4(const range &rdest, { return concat(raux1, merge (raux2, vrange_input[pos[1]], vrange_input[pos[0]], comp)); - }; -}; + } +} //----------------------------------------------------------------------------- // function : uninit_full_merge4 @@ -236,7 +236,7 @@ range uninit_full_merge4(const range &dest, if (nrange_input == 2) { return merge_construct(dest, vrange_input[0], vrange_input[1], comp); - }; + } //------------------------------------------------------------------------ // Initial sort @@ -319,13 +319,13 @@ range uninit_full_merge4(const range &dest, return concat(raux1, merge_construct(raux2, vrange_input[pos[1]], vrange_input[pos[0]], comp)); - }; -}; + } +} //**************************************************************************** -};// End namespace common -};// End namespace sort -};// End namespace boost +}// End namespace common +}// End namespace sort +}// End namespace boost //**************************************************************************** // #endif diff --git a/include/boost/sort/common/merge_vector.hpp b/include/boost/sort/common/merge_vector.hpp index aaba93d..1657455 100644 --- a/include/boost/sort/common/merge_vector.hpp +++ b/include/boost/sort/common/merge_vector.hpp @@ -67,7 +67,7 @@ void merge_level4(range dest, std::vector > &v_input, { v_output.emplace_back(move_forward(dest, v_input[0])); return; - }; + } uint32_t nrange = v_input.size(); uint32_t pos_ini = 0; @@ -80,9 +80,9 @@ void merge_level4(range dest, std::vector > &v_input, dest.first = rz.last; pos_ini += nelem; nrange -= nelem; - }; + } return; -}; +} // //----------------------------------------------------------------------------- // function : uninit_merge_level4 @@ -129,7 +129,7 @@ void uninit_merge_level4(range dest, nrange -= nelem; }; return; -}; +} // //----------------------------------------------------------------------------- // function : merge_vector4 @@ -187,12 +187,12 @@ range merge_vector4(range range_input, }; }; return (sw) ? v_output[0] : move_forward(range_output, v_input[0]); -}; +} //**************************************************************************** -};// End namespace common -};// End namespace sort -};// End namespace boost +}// End namespace common +}// End namespace sort +}// End namespace boost //**************************************************************************** // #endif diff --git a/include/boost/sort/common/pivot.hpp b/include/boost/sort/common/pivot.hpp index 7b10385..33ada27 100644 --- a/include/boost/sort/common/pivot.hpp +++ b/include/boost/sort/common/pivot.hpp @@ -50,7 +50,7 @@ inline Iter_t mid3 (Iter_t iter_1, Iter_t iter_2, Iter_t iter_3, Compare comp) if (comp (*iter_2, *iter_1)) swap ( *iter_2, *iter_1); }; return iter_2; -}; +} // //----------------------------------------------------------------------------- // function : pivot3 @@ -69,7 +69,7 @@ inline void pivot3 (Iter_t first, Iter_t last, Compare comp) auto N2 = (last - first) >> 1; Iter_t it_val = mid3 (first + 1, first + N2, last - 1, comp); swap (*first, *it_val); -}; +} // //----------------------------------------------------------------------------- @@ -96,7 +96,7 @@ inline Iter_t mid9 (Iter_t iter_1, Iter_t iter_2, Iter_t iter_3, Iter_t iter_4, return mid3 (mid3 (iter_1, iter_2, iter_3, comp), mid3 (iter_4, iter_5, iter_6, comp), mid3 (iter_7, iter_8, iter_9, comp), comp); -}; +} // //----------------------------------------------------------------------------- // function : pivot9 @@ -118,10 +118,10 @@ inline void pivot9 (Iter_t first, Iter_t last, Compare comp) first + 3 * cupo, first + 4 * cupo, first + 5 * cupo, first + 6 * cupo, first + 7 * cupo, last - 1, comp); swap (*first, *itaux); -}; +} //**************************************************************************** -};// End namespace common -};// End namespace sort -};// End namespace boost +}// End namespace common +}// End namespace sort +}// End namespace boost //**************************************************************************** #endif diff --git a/include/boost/sort/common/range.hpp b/include/boost/sort/common/range.hpp index 73dbd5a..62634c6 100644 --- a/include/boost/sort/common/range.hpp +++ b/include/boost/sort/common/range.hpp @@ -110,7 +110,7 @@ inline range concat(const range &it1, const range &it2) { return range(it1.first, it2.last); } -; + // //----------------------------------------------------------------------------- // function : move_forward @@ -126,7 +126,8 @@ inline range move_forward(const range &dest, assert(dest.size() >= src.size()); Iter2_t it_aux = util::move_forward(dest.first, src.first, src.last); return range(dest.first, it_aux); -}; +} + // //----------------------------------------------------------------------------- // function : move_backward @@ -143,7 +144,7 @@ inline range move_backward(const range &dest, Iter2_t it_aux = util::move_backward(dest.first + src.size(), src.first, src.last); return range(dest.first, dest.src.size()); -}; +} //----------------------------------------------------------------------------- // function : uninit_move @@ -159,7 +160,8 @@ inline range move_construct(const range &dest, { Value_t *ptr_aux = util::move_construct(dest.first, src.first, src.last); return range(dest.first, ptr_aux); -}; +} + // //----------------------------------------------------------------------------- // function : destroy @@ -170,7 +172,8 @@ template inline void destroy(range rng) { util::destroy(rng.first, rng.last); -}; +} + // //----------------------------------------------------------------------------- // function : initialize @@ -184,7 +187,8 @@ inline range initialize(const range &rng, Value_t &val) { util::initialize(rng.first, rng.last, val); return rng; -}; +} + // //----------------------------------------------------------------------------- // function : is_mergeable @@ -210,7 +214,8 @@ inline bool is_mergeable(const range &src1, const range &src2, // Code //------------------------------------------------------------------------ return comp(*(src2.front()), *(src1.back())); -}; +} + // //----------------------------------------------------------------------------- // function : is_mergeable_stable @@ -236,7 +241,8 @@ inline bool is_mergeable_stable(const range &src1, // Code //------------------------------------------------------------------------ return not comp(*(src1.back()), *(src2.front())); -}; +} + // //----------------------------------------------------------------------------- // function : merge @@ -259,7 +265,7 @@ inline range merge(const range &dest, Iter3_t it_aux = util::merge(src1.first, src1.last, src2.first, src2.last, dest.first, comp); return range(dest.first, it_aux); -}; +} //----------------------------------------------------------------------------- // function : merge_construct @@ -284,7 +290,8 @@ inline range merge_construct(const range &dest, Value_t * ptr_aux = util::merge_construct(src1.first, src1.last, src2.first, src2.last, dest.first, comp); return range(dest.first, ptr_aux); -}; +} + // //--------------------------------------------------------------------------- // function : half_merge @@ -307,7 +314,8 @@ inline range merge_half(const range &dest, Iter2_t it_aux = util::merge_half(src1.first, src1.last, src2.first, src2.last, dest.first, comp); return range(dest.first, it_aux); -}; +} + // //----------------------------------------------------------------------------- // function : merge_uncontiguous @@ -327,7 +335,8 @@ inline bool merge_uncontiguous(const range &src1, { return util::merge_uncontiguous(src1.first, src1.last, src2.first, src2.last, aux.first, comp); -}; +} + // //----------------------------------------------------------------------------- // function : merge_contiguous @@ -346,7 +355,8 @@ inline range merge_contiguous(const range &src1, { util::merge_contiguous(src1.first, src1.last, src2.last, buf.first, comp); return concat(src1, src2); -}; +} + // //----------------------------------------------------------------------------- // function : merge_flow @@ -390,12 +400,12 @@ static void merge_flow(range rng1, range rbuf, if (rx2.first == rx2.last) return; if (rbx.first == rbx.last) move_forward(rbuf, rng2); else merge_half(rbuf, rx2, rbx, cmp); -}; +} //**************************************************************************** -};// End namespace common -};// End namespace sort -};// End namespace boost +}// End namespace common +}// End namespace sort +}// End namespace boost //**************************************************************************** // #endif diff --git a/include/boost/sort/common/rearrange.hpp b/include/boost/sort/common/rearrange.hpp index d32db09..533fed9 100644 --- a/include/boost/sort/common/rearrange.hpp +++ b/include/boost/sort/common/rearrange.hpp @@ -102,7 +102,7 @@ void rearrange(Iter_data global_first, Iter_index itx_first, index[pos_ini] = std::move(itx_src); ++pos_ini; }; -}; +} /* // @@ -162,9 +162,9 @@ void rearrange(Iter_data global_first, Iter_index itx_first, */ // //**************************************************************************** -};// End namespace common -};// End namespace sort -};// End namespace boost +}// End namespace common +}// End namespace sort +}// End namespace boost //**************************************************************************** // #endif diff --git a/include/boost/sort/common/sort_basic.hpp b/include/boost/sort/common/sort_basic.hpp index 35121ae..b87bf1a 100644 --- a/include/boost/sort/common/sort_basic.hpp +++ b/include/boost/sort/common/sort_basic.hpp @@ -81,7 +81,7 @@ inline Iter_t is_reverse_stable_sorted_forward(Iter_t first, Iter_t last, Iter_t it2 = first + 1; for (Iter_t it1 = first; it2 != last and comp(*it2, *it1); it1 = it2++); return it2; -}; +} //----------------------------------------------------------------------------- // function : number_stable_sorted_forward /// @brief examine the elements in the range first, last if they are stable @@ -118,7 +118,7 @@ size_t number_stable_sorted_forward (Iter_t first, Iter_t last, if ( nsorted < min_process) return 0 ; util::reverse ( first , it2); return nsorted; -}; +} //----------------------------------------------------------------------------- // function : is_stable_sorted_backward @@ -249,7 +249,7 @@ inline void internal_sort (const range &rng1, internal_sort(rng2_right, rng1_right, comp, level + 1, even); }; merge(rng2, rng1_left, rng1_right, comp); -}; +} //----------------------------------------------------------------------------- // function : range_sort_data /// @brief this sort elements using the range_sort function and receiving a @@ -286,7 +286,7 @@ static void range_sort_data (const range & rng_data, }; internal_sort(rng_aux, rng_data, comp, 0, true); -}; +} //----------------------------------------------------------------------------- // function : range_sort_buffer /// @brief this sort elements using the range_sort function and receiving a @@ -324,11 +324,11 @@ static void range_sort_buffer(const range & rng_data, }; internal_sort(rng_data, rng_aux, comp, 0, false); -}; +} //**************************************************************************** -};// End namespace common -};// End namespace sort -};// End namepspace boost +}// End namespace common +}// End namespace sort +}// End namepspace boost //**************************************************************************** // #endif diff --git a/include/boost/sort/common/spinlock.hpp b/include/boost/sort/common/spinlock.hpp index 5287ccb..d88796b 100644 --- a/include/boost/sort/common/spinlock.hpp +++ b/include/boost/sort/common/spinlock.hpp @@ -48,7 +48,7 @@ class spinlock_t /// @brief class constructor /// @param [in] //------------------------------------------------------------------------- - explicit spinlock_t ( ) noexcept { af.clear ( ); }; + explicit spinlock_t ( ) noexcept { af.clear ( ); } // //------------------------------------------------------------------------- // function : lock @@ -59,8 +59,8 @@ class spinlock_t while (af.test_and_set (std::memory_order_acquire)) { std::this_thread::yield ( ); - }; - }; + } + } // //------------------------------------------------------------------------- // function : try_lock @@ -71,19 +71,19 @@ class spinlock_t bool try_lock ( ) noexcept { return !af.test_and_set (std::memory_order_acquire); - }; + } // //------------------------------------------------------------------------- // function : unlock /// @brief unlock the spinlock_t //------------------------------------------------------------------------- - void unlock ( ) noexcept { af.clear (std::memory_order_release); }; + void unlock ( ) noexcept { af.clear (std::memory_order_release); } }; // E N D C L A S S S P I N L O C K // //*************************************************************************** -}; // end namespace common -}; // end namespace sort -}; // end namespace boost +} // end namespace common +} // end namespace sort +} // end namespace boost //*************************************************************************** #endif diff --git a/include/boost/sort/common/util/merge.hpp b/include/boost/sort/common/util/merge.hpp index fbbd6c5..4f22b74 100644 --- a/include/boost/sort/common/util/merge.hpp +++ b/include/boost/sort/common/util/merge.hpp @@ -129,7 +129,7 @@ static Iter3_t merge(Iter1_t buf1, const Iter1_t end_buf1, Iter2_t buf2, move_forward(buf_out, buf2, end_buf2) : move_forward(buf_out, buf1, end_buf1); } -; + // //----------------------------------------------------------------------------- // function : merge_construct diff --git a/include/boost/sort/flat_stable_sort/flat_stable_sort.hpp b/include/boost/sort/flat_stable_sort/flat_stable_sort.hpp index 340b9ff..d622940 100644 --- a/include/boost/sort/flat_stable_sort/flat_stable_sort.hpp +++ b/include/boost/sort/flat_stable_sort/flat_stable_sort.hpp @@ -132,7 +132,7 @@ ::divide(it_index itx_first, it_index itx_last) divide(itx_first, itx_first + nblock1); divide(itx_first + nblock1, itx_last); merge_range_pos(itx_first, itx_first + nblock1, itx_last); -}; +} // //------------------------------------------------------------------------ // function : sort_small @@ -169,7 +169,7 @@ ::sort_small(it_index itx_first, it_index itx_last) range_sort_data(rng_data2, rng_aux2, cmp); range_sort_buffer(rng_data1, rng_aux1, cmp); merge_half(rng_data, rng_aux1, rng_data2, cmp); -}; +} // //------------------------------------------------------------------------ // function : is_sorted_forward @@ -210,7 +210,7 @@ ::is_sorted_forward(it_index itx_first, it_index itx_last) merge_range_pos(itx_first, itx_first + nblock1, itx_last); }; return true; -}; +} // //------------------------------------------------------------------------ // function : is_sorted_backward @@ -251,9 +251,9 @@ ::is_sorted_backward(it_index itx_first, it_index itx_last) merge_range_pos(itx_first, itx_first + nblock1, itx_last); }; return true; -}; +} //**************************************************************************** -};// End namespace flat_internal +}// End namespace flat_internal //**************************************************************************** // namespace bscu = boost::sort::common::util; @@ -271,7 +271,7 @@ inline void flat_stable_sort (Iter_t first, Iter_t last, Compare cmp = Compare()) { flat::flat_stable_sort (first, last, cmp); -}; +} template struct block_size_fss @@ -298,7 +298,7 @@ inline void flat_stable_sort (Iter_t first, Iter_t last, flat::flat_stable_sort )>::data> (first, last, cmp); -}; +} template > inline void indirect_flat_stable_sort (Iter_t first, Iter_t last, @@ -308,11 +308,11 @@ inline void indirect_flat_stable_sort (Iter_t first, Iter_t last, typedef common::less_ptr_no_null itx_comp; common::indirect_sort ( flat_stable_sort, first, last, comp); -}; +} //**************************************************************************** -};// End namespace sort -};// End namepspace boost +}// End namespace sort +}// End namepspace boost //**************************************************************************** // #endif diff --git a/include/boost/sort/insert_sort/insert_sort.hpp b/include/boost/sort/insert_sort/insert_sort.hpp index e7fe6f6..7776373 100644 --- a/include/boost/sort/insert_sort/insert_sort.hpp +++ b/include/boost/sort/insert_sort/insert_sort.hpp @@ -58,12 +58,12 @@ static void insert_sort (Iter_t first, Iter_t last, }; *it_insertion = std::move (Aux); }; -}; +} // //**************************************************************************** -}; // End namespace sort -}; // End namespace boost +} // End namespace sort +} // End namespace boost //**************************************************************************** // #endif diff --git a/include/boost/sort/parallel_stable_sort/parallel_stable_sort.hpp b/include/boost/sort/parallel_stable_sort/parallel_stable_sort.hpp index cd68557..37f4613 100644 --- a/include/boost/sort/parallel_stable_sort/parallel_stable_sort.hpp +++ b/include/boost/sort/parallel_stable_sort/parallel_stable_sort.hpp @@ -200,11 +200,11 @@ ::parallel_stable_sort (Iter_t first, Iter_t last, Compare comp, -}; // end of constructor +} // end of constructor // //**************************************************************************** -};// End namespace stable_detail +}// End namespace stable_detail //**************************************************************************** // @@ -237,7 +237,7 @@ void parallel_stable_sort(Iter_t first, Iter_t last) { typedef bscu::compare_iter Compare; stable_detail::parallel_stable_sort(first, last); -}; +} // //----------------------------------------------------------------------------- // function : parallel_stable_sort @@ -254,7 +254,7 @@ void parallel_stable_sort(Iter_t first, Iter_t last, uint32_t nthread) { typedef bscu::compare_iter Compare; stable_detail::parallel_stable_sort(first, last, nthread); -}; +} // //----------------------------------------------------------------------------- // function : parallel_stable_sort @@ -271,7 +271,7 @@ template (first, last, comp); -}; +} // //----------------------------------------------------------------------------- @@ -294,8 +294,8 @@ void parallel_stable_sort (Iter_t first, Iter_t last, Compare comp, } // //**************************************************************************** -};// End namespace sort -};// End namespace boost +}// End namespace sort +}// End namespace boost //**************************************************************************** // #endif diff --git a/include/boost/sort/sample_sort/sample_sort.hpp b/include/boost/sort/sample_sort/sample_sort.hpp index e52e2dd..095108a 100644 --- a/include/boost/sort/sample_sort/sample_sort.hpp +++ b/include/boost/sort/sample_sort/sample_sort.hpp @@ -124,22 +124,22 @@ struct sample_sort sample_sort(Iter_t first, Iter_t last) : sample_sort (first, last, Compare(), std::thread::hardware_concurrency(), - nullptr, 0) { }; + nullptr, 0) { } sample_sort(Iter_t first, Iter_t last, Compare cmp) : sample_sort(first, last, cmp, std::thread::hardware_concurrency(), - nullptr, 0) { }; + nullptr, 0) { } sample_sort(Iter_t first, Iter_t last, uint32_t num_thread) - : sample_sort(first, last, Compare(), num_thread, nullptr, 0) { }; + : sample_sort(first, last, Compare(), num_thread, nullptr, 0) { } sample_sort(Iter_t first, Iter_t last, Compare cmp, uint32_t num_thread) - : sample_sort(first, last, cmp, num_thread, nullptr, 0) { }; + : sample_sort(first, last, cmp, num_thread, nullptr, 0) { } sample_sort(Iter_t first, Iter_t last, Compare cmp, uint32_t num_thread, range_buf range_buf_initial) : sample_sort(first, last, cmp, num_thread, - range_buf_initial.first, range_buf_initial.size()) { }; + range_buf_initial.first, range_buf_initial.size()) { } void destroy_all(void); // @@ -148,7 +148,7 @@ struct sample_sort /// @brief destructor of the class. The utility is to destroy the temporary /// buffer used in the sorting process //----------------------------------------------------------------------------- - ~sample_sort(void) { destroy_all(); }; + ~sample_sort(void) { destroy_all(); } // //----------------------------------------------------------------------- // function : execute first @@ -161,8 +161,8 @@ struct sample_sort { uninit_merge_level4(vrange_buf_ini[job], vv_range_it[job], vv_range_buf[job], comp); - }; - }; + } + } // //----------------------------------------------------------------------- // function : execute @@ -175,8 +175,8 @@ struct sample_sort { merge_vector4(vrange_buf_ini[job], vrange_it_ini[job], vv_range_buf[job], vv_range_it[job], comp); - }; - }; + } + } // //----------------------------------------------------------------------- // function : first merge @@ -193,7 +193,7 @@ struct sample_sort }; for (uint32_t i = 0; i < nthread; ++i) vfuture[i].get(); - }; + } // //----------------------------------------------------------------------- // function : final merge @@ -206,10 +206,10 @@ struct sample_sort for (uint32_t i = 0; i < nthread; ++i) { vfuture[i] = std::async(std::launch::async, &this_t::execute, this); - }; + } for (uint32_t i = 0; i < nthread; ++i) vfuture[i].get(); - }; + } //---------------------------------------------------------------------------- }; // End class sample_sort @@ -259,7 +259,7 @@ ::sample_sort (Iter_t first, Iter_t last, Compare cmp, uint32_t num_thread, { bss::spinsort(first, last, comp); return; - }; + } //------------------- check if sort -------------------------------------- bool sw = true; @@ -279,7 +279,7 @@ ::sample_sort (Iter_t first, Iter_t last, Compare cmp, uint32_t num_thread, for (size_t i = 0; i < nelem2; ++i) swap(*(it1++), *(it2--)); return; - }; + } if (paux != nullptr) { @@ -296,7 +296,7 @@ ::sample_sort (Iter_t first, Iter_t last, Compare cmp, uint32_t num_thread, if (ptr == nullptr) throw std::bad_alloc(); owner = true; global_buf = range_buf(ptr, ptr + nelem); - }; + } //------------------------------------------------------------------------ // PROCESS //------------------------------------------------------------------------ @@ -306,20 +306,20 @@ ::sample_sort (Iter_t first, Iter_t last, Compare cmp, uint32_t num_thread, } catch (std::bad_alloc &) { error = true; - }; + } if (not error) { first_merge(); construct = true; final_merge(); - }; + } if (error) { destroy_all(); throw std::bad_alloc(); - }; + } } -; + // //----------------------------------------------------------------------------- // function : destroy_all @@ -464,22 +464,22 @@ void sample_sort::initial_configuration(void) if (nelem_range != 0) { vv_range_it[k].push_back(vv_range_first[i][k]); - }; + } nelem_interval += nelem_range; - }; + } vrange_it_ini.emplace_back(it, it + nelem_interval); vrange_buf_ini.emplace_back(it_buf, it_buf + nelem_interval); it += nelem_interval; it_buf += nelem_interval; - }; + } } -; + // //**************************************************************************** } -; + // End namespace sample_detail //**************************************************************************** // @@ -505,7 +505,7 @@ void sample_sort(Iter_t first, Iter_t last) { typedef compare_iter Compare; sample_detail::sample_sort(first, last); -}; +} // //----------------------------------------------------------------------------- // function : sample_sort @@ -521,7 +521,7 @@ void sample_sort(Iter_t first, Iter_t last, uint32_t nthread) { typedef compare_iter Compare; sample_detail::sample_sort(first, last, nthread); -}; +} // //----------------------------------------------------------------------------- // function : sample_sort @@ -537,7 +537,7 @@ template * = void sample_sort(Iter_t first, Iter_t last, Compare comp) { sample_detail::sample_sort(first, last, comp); -}; +} // //----------------------------------------------------------------------------- // function : sample_sort @@ -554,11 +554,11 @@ template void sample_sort(Iter_t first, Iter_t last, Compare comp, uint32_t nthread) { sample_detail::sample_sort(first, last, comp, nthread); -}; +} // //**************************************************************************** -};// End namespace sort -};// End namespace boost +}// End namespace sort +}// End namespace boost //**************************************************************************** // #endif diff --git a/include/boost/sort/spinsort/spinsort.hpp b/include/boost/sort/spinsort/spinsort.hpp index b8d0fdf..8895877 100644 --- a/include/boost/sort/spinsort/spinsort.hpp +++ b/include/boost/sort/spinsort/spinsort.hpp @@ -134,7 +134,7 @@ static void insert_partial_sort (Iter1_t first, Iter1_t mid, Iter1_t last, *(viter[i - 1] + (i - 1)) = std::move(*(data + (i - 1))); }; } -; + //----------------------------------------------------------------------------- // function : check_stable_sort /// @brief check if the elements between first and last are osted or reverse @@ -222,7 +222,7 @@ static bool check_stable_sort(const range &rng_data, }; return true; } -; + //----------------------------------------------------------------------------- // function : range_sort /// @brief this function divide r_input in two parts, sort it,and merge moving @@ -297,7 +297,7 @@ static void range_sort(const range &range1, merge(range2, range_input1, range_input2, comp); } -; + //----------------------------------------------------------------------------- // function : sort_range_sort /// @brief this sort elements using the range_sort function and receiving a @@ -349,7 +349,7 @@ static void sort_range_sort(const range &rng_data, move_forward(rng_data, rng_buffer); }; } -; + // //############################################################################ // ## @@ -423,6 +423,7 @@ class spinsort if (owner and ptr != nullptr) std::free (ptr); }; }; + //---------------------------------------------------------------------------- // End of class spinsort //---------------------------------------------------------------------------- @@ -532,10 +533,10 @@ ::spinsort (Iter_t first, Iter_t last, Compare comp, value_t *paux, size_t naux) range_sort(range_1, range_2, comp, nlevel); merge_half(range_input, range_aux, range_2, comp); }; -}; +} //**************************************************************************** -};// End namepspace spin_detail +}// End namepspace spin_detail //**************************************************************************** // namespace bsc = boost::sort::common; @@ -552,7 +553,7 @@ template > inline void spinsort (Iter_t first, Iter_t last, Compare comp = Compare()) { spin_detail::spinsort (first, last, comp); -}; +} template > inline void indirect_spinsort (Iter_t first, Iter_t last, @@ -561,11 +562,11 @@ inline void indirect_spinsort (Iter_t first, Iter_t last, typedef typename std::vector::iterator itx_iter; typedef common::less_ptr_no_null itx_comp; common::indirect_sort (spinsort, first, last, comp); -}; +} //**************************************************************************** -};// End namespace sort -};// End namepspace boost +}// End namespace sort +}// End namepspace boost //**************************************************************************** // #endif