Exemplo n.º 1
0
Arquivo: scan.hpp Projeto: Sanac/hpx
            static hpx::util::unused_type
            sequential(ExPolicy && policy, InIter first,
                InIter last, OutIter dest, T && init, Op && op)
            {
                InIter first_t = first;
                Algo().sequential(
                    std::forward<ExPolicy>(policy), first, last, dest,
                    std::forward<T>(init), std::forward<Op>(op));

                return hpx::util::unused;
            }
Exemplo n.º 2
0
/////////////////////////////////////////////////////////////////////////
// Programme principal
/////////////////////////////////////////////////////////////////////////
int main()
{
    printf("Demarrage du programme\n\r") ;
    Init() ;

    while(true) {

        // Appel au gestionnaire d'evenements
        giEvent = EventHandler() ;
        // Appel a la machine a etats
        Algo() ;
    }
}
Exemplo n.º 3
0
        typename util::detail::algorithm_result<
            ExPolicy, std::pair<FwdIter1, FwdIter2>
        >::type
        transfer_(ExPolicy && policy, FwdIter1 first, FwdIter1 last,
            FwdIter2 dest, std::false_type)
        {
            typedef parallel::execution::is_sequenced_execution_policy<ExPolicy>
                is_seq;

            return Algo().call(
                std::forward<ExPolicy>(policy), is_seq(),
                first, last, dest);
        }
Exemplo n.º 4
0
Arquivo: scan.hpp Projeto: Sanac/hpx
            static typename util::detail::algorithm_result<ExPolicy>::type
            parallel(ExPolicy && policy, InIter first,
                InIter last, OutIter dest, T && init, Op && op)
            {
                typedef typename util::detail::algorithm_result<ExPolicy>::type
                    result_type;

                if(first == last)
                    return util::detail::algorithm_result<ExPolicy>::get();


                return hpx::util::void_guard<result_type>(),
                    Algo().parallel(
                        std::forward<ExPolicy>(policy), first, last, dest,
                        std::forward<T>(init), std::forward<Op>(op));
            }
Exemplo n.º 5
0
        typename util::detail::algorithm_result<
            ExPolicy, std::pair<InIter, OutIter>
        >::type
        transfer_(ExPolicy&& policy, InIter first, InIter last, OutIter dest,
            std::true_type)
        {
            if (first == last)
            {
                return util::detail::algorithm_result<
                        ExPolicy, std::pair<InIter, OutIter>
                    >::get(std::make_pair(last, dest));
            }

            typedef parallel::is_sequential_execution_policy<ExPolicy> is_seq;
            return segmented_transfer(Algo(),
                std::forward<ExPolicy>(policy), is_seq(),
                first, last, dest);
        }