1 #ifndef LIBJMMCG_CORE_PRIVATE_PARALLEL_ALGORITHMS_HPP
2 #define LIBJMMCG_CORE_PRIVATE_PARALLEL_ALGORITHMS_HPP
25 #include "../../core/config.h"
26 #include "../../core/shared_ptr.hpp"
28 #include <boost/function.hpp>
66 template<
class CoreWk>
102 template<
class CoreWk>
138 template<
class CoreWk>
140 wk.resize_output(wk.work_complete()->containers().input1.size());
152 template<
class Conts,
typename Fn>
165 : beg(b), end(e), fn(w) {
169 std::for_each(beg, end, fn.input().op);
187 template<
typename Pred,
typename CTR>
223 template<
class Conts,
typename CtrPred>
240 : beg(b), end(e), fn(w) {
258 template<
typename BinOp,
typename Acc>
295 template<
class Conts,
typename Fn>
312 : beg(b), end(e), fn(w) {
337 template<
class Conts,
typename CtrPred>
375 template<
class Conts,
typename Fn>
417 template<
class Conts,
typename Fn>
458 template<
class Conts,
typename UniOp>
472 : in_beg(ib), in_end(ie), out(o), fn(w) {
476 std::transform(in_beg, in_end, out, fn.input().op);
497 template<
class Conts,
typename BinOp>
512 : in1_beg(i1b), in1_end(i1e), in2_beg(i2b), iter_out(o), fn(w) {
516 std::transform(in1_beg, in1_end, in2_beg, iter_out, fn.input().op);
534 template<
class Colln>
564 template<
class CoreWk>
569 typename Colln::container_type::iterator cont_beg_;
570 typename Colln::container_type::iterator cont_end_;
580 template<
class Conts,
typename Fn>
603 const typename std::iterator_traits<
in_iterator>::difference_type cont_size;
614 template<
typename Conts,
class UniOp>
627 : beg(b), end(e), val(op) {
649 template<
typename Conts,
class UniOp>
662 : beg(b), end(e), val(op) {
684 template<
class Conts,
typename Pred>
698 : begin1(b1), end1(e1), begin2(b2), fn(f) {
718 template<
class Comp,
class TPB>
738 template<
class CoreWk>
751 template<
direction Dir,
class out_iterator,
class Closure>
752 class swap_pred :
public std::binary_function<
typename out_iterator::value_type,
typename out_iterator::value_type,
bool> {
762 typename Closure::argument_type
const &arg;
765 template<
class Iter,
class operation_type,
direction LHSDir,
direction RHSDir,
class Dummy>
784 template<
class Iter,
class operation_type,
direction LHSDir,
direction RHSDir,
class SortFn>
810 template<
class Conts,
typename Comp>
837 typedef merge<direction::ascending, direction::ascending, merge_final_sorter> init_merger_t;
838 typedef typename init_merger_t::sort_fn_t sort_fn_t;
878 template<
class Comp,
class TPB>
898 template<
class CoreWk>
912 template<
typename Conts,
class Comp>
978 template<
class ArgT,
class UniFn,
class PT>
987 struct arg_int_work_type;
989 struct arg_context_t;
991 using shared_ptr_t=
shared_ptr<arg_context_t, api_lock_traits<platform_api, sequential_mode>>;
1012 shared_ptr_t arg_cxt;
1019 template<
class ArgT1,
class ArgT2,
class BinFn,
class PT>
1030 struct arg_int_work_type;
1032 struct arg_contexts_t;
1034 using shared_ptr_t=
shared_ptr<arg_contexts_t, api_lock_traits<platform_api, sequential_mode>>;
1053 operator<(Arg1
const &)
const noexcept(
true) {
1060 shared_ptr_t arg_cxts;