Skip to content

Commit

Permalink
Refactored code relying on tuple implementation details.
Browse files Browse the repository at this point in the history
  • Loading branch information
K-ballo committed Oct 4, 2013
1 parent dfb99f7 commit fe9eec1
Show file tree
Hide file tree
Showing 36 changed files with 1,413 additions and 1,408 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ namespace hpx { namespace actions { namespace detail

#define HPX_ACTION_DIRECT_ARGUMENT(z, n, data) \
BOOST_PP_COMMA_IF(n) \
boost::forward< \
typename util::remove_reference<Arguments>::type:: \
BOOST_PP_CAT(member_type, n)>(data. BOOST_PP_CAT(a, n)) \
util::get<n>(boost::forward<Arguments>(data)) \
/**/
#define HPX_REMOVE_QUALIFIERS(z, n, data) \
BOOST_PP_COMMA_IF(n) \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@

#define HPX_ACTION_DIRECT_ARGUMENT(z, n, data) \
BOOST_PP_COMMA_IF(n) \
boost::forward< \
typename util::remove_reference<Arguments>::type:: \
BOOST_PP_CAT(member_type, n)>(data. BOOST_PP_CAT(a, n)) \
util::get<n>(boost::forward<Arguments>(data)) \
/**/
#define HPX_REMOVE_QUALIFIERS(z, n, data) \
BOOST_PP_COMMA_IF(n) \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ namespace detail

#define HPX_ACTION_DIRECT_ARGUMENT(z, n, data) \
BOOST_PP_COMMA_IF(n) \
boost::forward< \
typename util::remove_reference<Arguments>::type:: \
BOOST_PP_CAT(member_type, n)>(data. BOOST_PP_CAT(a, n)) \
util::get<n>(boost::forward<Arguments>(data)) \
/**/

#include BOOST_PP_ITERATE()
Expand Down
4 changes: 1 addition & 3 deletions hpx/runtime/actions/construct_continuation_functions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@

#define HPX_ACTION_DIRECT_ARGUMENT(z, n, data) \
BOOST_PP_COMMA_IF(n) \
boost::forward< \
typename util::remove_reference<Arguments_>::type:: \
BOOST_PP_CAT(member_type, n)>(data. BOOST_PP_CAT(a, n)) \
util::get<n>(boost::forward<Arguments_>(data)) \
/**/

#define BOOST_PP_ITERATION_PARAMS_1 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@

#define HPX_ACTION_DIRECT_ARGUMENT(z, n, data) \
BOOST_PP_COMMA_IF(n) \
boost::forward< \
typename util::remove_reference<Arguments>::type:: \
BOOST_PP_CAT(member_type, n)>(data. BOOST_PP_CAT(a, n)) \
util::get<n>(boost::forward<Arguments>(data)) \
/**/
#define HPX_REMOVE_QUALIFIERS(z, n, data) \
BOOST_PP_COMMA_IF(n) \
Expand Down Expand Up @@ -148,8 +146,8 @@ namespace hpx { namespace actions
BOOST_FWD_REF(Arguments) args)
{
return boost::move(Derived::decorate_action(
HPX_STD_BIND(typename Derived::thread_function(),
lva, BOOST_PP_REPEAT(N, HPX_ACTION_DIRECT_ARGUMENT, args)), lva));
HPX_STD_BIND(typename Derived::thread_function(), lva,
BOOST_PP_REPEAT(N, HPX_ACTION_DIRECT_ARGUMENT, args)), lva));
}

// This static construct_thread_function allows to construct
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ namespace hpx { namespace actions
BOOST_FWD_REF(Arguments) args)
{
return boost::move(Derived::decorate_action(
HPX_STD_BIND(typename Derived::thread_function(),
lva, boost::forward< typename util::remove_reference<Arguments>::type:: member_type0>( args. a0)), lva));
HPX_STD_BIND(typename Derived::thread_function(), lva,
util::get< 0>(boost::forward<Arguments>( args))), lva));
}


Expand Down Expand Up @@ -120,7 +120,7 @@ namespace hpx { namespace actions
<< ") lva(" << reinterpret_cast<void const*>(
get_lva<Component>::call(lva)) << ")";
return (get_lva<Component>::call(lva)->*F)(
boost::forward< typename util::remove_reference<Arguments>::type:: member_type0>( args. a0));
util::get< 0>(boost::forward<Arguments>( args)));
}
};

Expand Down Expand Up @@ -302,7 +302,7 @@ namespace hpx { namespace actions

return boost::move(Derived::decorate_action(
HPX_STD_BIND(typename Derived::thread_function(), lva,
boost::forward< typename util::remove_reference<Arguments>::type:: member_type0>( args. a0)), lva));
util::get< 0>(boost::forward<Arguments>( args))), lva));
}


Expand Down Expand Up @@ -330,7 +330,7 @@ namespace hpx { namespace actions
<< ") lva(" << reinterpret_cast<void const*>(
get_lva<Component>::call(lva)) << ")";
(get_lva<Component>::call(lva)->*F)(
boost::forward< typename util::remove_reference<Arguments>::type:: member_type0>( args. a0));
util::get< 0>(boost::forward<Arguments>( args)));
return util::unused;
}
};
Expand Down Expand Up @@ -526,8 +526,8 @@ namespace hpx { namespace actions
BOOST_FWD_REF(Arguments) args)
{
return boost::move(Derived::decorate_action(
HPX_STD_BIND(typename Derived::thread_function(),
lva, boost::forward< typename util::remove_reference<Arguments>::type:: member_type0>( args. a0) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type1>( args. a1)), lva));
HPX_STD_BIND(typename Derived::thread_function(), lva,
util::get< 0>(boost::forward<Arguments>( args)) , util::get< 1>(boost::forward<Arguments>( args))), lva));
}


Expand Down Expand Up @@ -555,7 +555,7 @@ namespace hpx { namespace actions
<< ") lva(" << reinterpret_cast<void const*>(
get_lva<Component>::call(lva)) << ")";
return (get_lva<Component>::call(lva)->*F)(
boost::forward< typename util::remove_reference<Arguments>::type:: member_type0>( args. a0) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type1>( args. a1));
util::get< 0>(boost::forward<Arguments>( args)) , util::get< 1>(boost::forward<Arguments>( args)));
}
};

Expand Down Expand Up @@ -737,7 +737,7 @@ namespace hpx { namespace actions

return boost::move(Derived::decorate_action(
HPX_STD_BIND(typename Derived::thread_function(), lva,
boost::forward< typename util::remove_reference<Arguments>::type:: member_type0>( args. a0) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type1>( args. a1)), lva));
util::get< 0>(boost::forward<Arguments>( args)) , util::get< 1>(boost::forward<Arguments>( args))), lva));
}


Expand Down Expand Up @@ -765,7 +765,7 @@ namespace hpx { namespace actions
<< ") lva(" << reinterpret_cast<void const*>(
get_lva<Component>::call(lva)) << ")";
(get_lva<Component>::call(lva)->*F)(
boost::forward< typename util::remove_reference<Arguments>::type:: member_type0>( args. a0) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type1>( args. a1));
util::get< 0>(boost::forward<Arguments>( args)) , util::get< 1>(boost::forward<Arguments>( args)));
return util::unused;
}
};
Expand Down Expand Up @@ -961,8 +961,8 @@ namespace hpx { namespace actions
BOOST_FWD_REF(Arguments) args)
{
return boost::move(Derived::decorate_action(
HPX_STD_BIND(typename Derived::thread_function(),
lva, boost::forward< typename util::remove_reference<Arguments>::type:: member_type0>( args. a0) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type1>( args. a1) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type2>( args. a2)), lva));
HPX_STD_BIND(typename Derived::thread_function(), lva,
util::get< 0>(boost::forward<Arguments>( args)) , util::get< 1>(boost::forward<Arguments>( args)) , util::get< 2>(boost::forward<Arguments>( args))), lva));
}


Expand Down Expand Up @@ -990,7 +990,7 @@ namespace hpx { namespace actions
<< ") lva(" << reinterpret_cast<void const*>(
get_lva<Component>::call(lva)) << ")";
return (get_lva<Component>::call(lva)->*F)(
boost::forward< typename util::remove_reference<Arguments>::type:: member_type0>( args. a0) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type1>( args. a1) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type2>( args. a2));
util::get< 0>(boost::forward<Arguments>( args)) , util::get< 1>(boost::forward<Arguments>( args)) , util::get< 2>(boost::forward<Arguments>( args)));
}
};

Expand Down Expand Up @@ -1172,7 +1172,7 @@ namespace hpx { namespace actions

return boost::move(Derived::decorate_action(
HPX_STD_BIND(typename Derived::thread_function(), lva,
boost::forward< typename util::remove_reference<Arguments>::type:: member_type0>( args. a0) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type1>( args. a1) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type2>( args. a2)), lva));
util::get< 0>(boost::forward<Arguments>( args)) , util::get< 1>(boost::forward<Arguments>( args)) , util::get< 2>(boost::forward<Arguments>( args))), lva));
}


Expand Down Expand Up @@ -1200,7 +1200,7 @@ namespace hpx { namespace actions
<< ") lva(" << reinterpret_cast<void const*>(
get_lva<Component>::call(lva)) << ")";
(get_lva<Component>::call(lva)->*F)(
boost::forward< typename util::remove_reference<Arguments>::type:: member_type0>( args. a0) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type1>( args. a1) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type2>( args. a2));
util::get< 0>(boost::forward<Arguments>( args)) , util::get< 1>(boost::forward<Arguments>( args)) , util::get< 2>(boost::forward<Arguments>( args)));
return util::unused;
}
};
Expand Down Expand Up @@ -1396,8 +1396,8 @@ namespace hpx { namespace actions
BOOST_FWD_REF(Arguments) args)
{
return boost::move(Derived::decorate_action(
HPX_STD_BIND(typename Derived::thread_function(),
lva, boost::forward< typename util::remove_reference<Arguments>::type:: member_type0>( args. a0) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type1>( args. a1) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type2>( args. a2) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type3>( args. a3)), lva));
HPX_STD_BIND(typename Derived::thread_function(), lva,
util::get< 0>(boost::forward<Arguments>( args)) , util::get< 1>(boost::forward<Arguments>( args)) , util::get< 2>(boost::forward<Arguments>( args)) , util::get< 3>(boost::forward<Arguments>( args))), lva));
}


Expand Down Expand Up @@ -1425,7 +1425,7 @@ namespace hpx { namespace actions
<< ") lva(" << reinterpret_cast<void const*>(
get_lva<Component>::call(lva)) << ")";
return (get_lva<Component>::call(lva)->*F)(
boost::forward< typename util::remove_reference<Arguments>::type:: member_type0>( args. a0) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type1>( args. a1) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type2>( args. a2) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type3>( args. a3));
util::get< 0>(boost::forward<Arguments>( args)) , util::get< 1>(boost::forward<Arguments>( args)) , util::get< 2>(boost::forward<Arguments>( args)) , util::get< 3>(boost::forward<Arguments>( args)));
}
};

Expand Down Expand Up @@ -1607,7 +1607,7 @@ namespace hpx { namespace actions

return boost::move(Derived::decorate_action(
HPX_STD_BIND(typename Derived::thread_function(), lva,
boost::forward< typename util::remove_reference<Arguments>::type:: member_type0>( args. a0) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type1>( args. a1) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type2>( args. a2) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type3>( args. a3)), lva));
util::get< 0>(boost::forward<Arguments>( args)) , util::get< 1>(boost::forward<Arguments>( args)) , util::get< 2>(boost::forward<Arguments>( args)) , util::get< 3>(boost::forward<Arguments>( args))), lva));
}


Expand Down Expand Up @@ -1635,7 +1635,7 @@ namespace hpx { namespace actions
<< ") lva(" << reinterpret_cast<void const*>(
get_lva<Component>::call(lva)) << ")";
(get_lva<Component>::call(lva)->*F)(
boost::forward< typename util::remove_reference<Arguments>::type:: member_type0>( args. a0) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type1>( args. a1) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type2>( args. a2) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type3>( args. a3));
util::get< 0>(boost::forward<Arguments>( args)) , util::get< 1>(boost::forward<Arguments>( args)) , util::get< 2>(boost::forward<Arguments>( args)) , util::get< 3>(boost::forward<Arguments>( args)));
return util::unused;
}
};
Expand Down Expand Up @@ -1831,8 +1831,8 @@ namespace hpx { namespace actions
BOOST_FWD_REF(Arguments) args)
{
return boost::move(Derived::decorate_action(
HPX_STD_BIND(typename Derived::thread_function(),
lva, boost::forward< typename util::remove_reference<Arguments>::type:: member_type0>( args. a0) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type1>( args. a1) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type2>( args. a2) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type3>( args. a3) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type4>( args. a4)), lva));
HPX_STD_BIND(typename Derived::thread_function(), lva,
util::get< 0>(boost::forward<Arguments>( args)) , util::get< 1>(boost::forward<Arguments>( args)) , util::get< 2>(boost::forward<Arguments>( args)) , util::get< 3>(boost::forward<Arguments>( args)) , util::get< 4>(boost::forward<Arguments>( args))), lva));
}


Expand Down Expand Up @@ -1860,7 +1860,7 @@ namespace hpx { namespace actions
<< ") lva(" << reinterpret_cast<void const*>(
get_lva<Component>::call(lva)) << ")";
return (get_lva<Component>::call(lva)->*F)(
boost::forward< typename util::remove_reference<Arguments>::type:: member_type0>( args. a0) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type1>( args. a1) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type2>( args. a2) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type3>( args. a3) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type4>( args. a4));
util::get< 0>(boost::forward<Arguments>( args)) , util::get< 1>(boost::forward<Arguments>( args)) , util::get< 2>(boost::forward<Arguments>( args)) , util::get< 3>(boost::forward<Arguments>( args)) , util::get< 4>(boost::forward<Arguments>( args)));
}
};

Expand Down Expand Up @@ -2042,7 +2042,7 @@ namespace hpx { namespace actions

return boost::move(Derived::decorate_action(
HPX_STD_BIND(typename Derived::thread_function(), lva,
boost::forward< typename util::remove_reference<Arguments>::type:: member_type0>( args. a0) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type1>( args. a1) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type2>( args. a2) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type3>( args. a3) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type4>( args. a4)), lva));
util::get< 0>(boost::forward<Arguments>( args)) , util::get< 1>(boost::forward<Arguments>( args)) , util::get< 2>(boost::forward<Arguments>( args)) , util::get< 3>(boost::forward<Arguments>( args)) , util::get< 4>(boost::forward<Arguments>( args))), lva));
}


Expand Down Expand Up @@ -2070,7 +2070,7 @@ namespace hpx { namespace actions
<< ") lva(" << reinterpret_cast<void const*>(
get_lva<Component>::call(lva)) << ")";
(get_lva<Component>::call(lva)->*F)(
boost::forward< typename util::remove_reference<Arguments>::type:: member_type0>( args. a0) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type1>( args. a1) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type2>( args. a2) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type3>( args. a3) , boost::forward< typename util::remove_reference<Arguments>::type:: member_type4>( args. a4));
util::get< 0>(boost::forward<Arguments>( args)) , util::get< 1>(boost::forward<Arguments>( args)) , util::get< 2>(boost::forward<Arguments>( args)) , util::get< 3>(boost::forward<Arguments>( args)) , util::get< 4>(boost::forward<Arguments>( args)));
return util::unused;
}
};
Expand Down
4 changes: 1 addition & 3 deletions hpx/runtime/actions/plain_action_implementations.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@

#define HPX_ACTION_DIRECT_ARGUMENT(z, n, data) \
BOOST_PP_COMMA_IF(n) \
boost::forward< \
typename util::remove_reference<Arguments>::type:: \
BOOST_PP_CAT(member_type, n)>(data. BOOST_PP_CAT(a, n)) \
util::get<n>(boost::forward<Arguments>(data)) \
/**/
#define HPX_REMOVE_QUALIFIERS(z, n, data) \
BOOST_PP_COMMA_IF(n) \
Expand Down
Loading

0 comments on commit fe9eec1

Please sign in to comment.