|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r71896 - in trunk: boost/phoenix/core/detail boost/phoenix/stl/container libs/phoenix/example
From: thom.heller_at_[hidden]
Date: 2011-05-12 11:53:26
Author: theller
Date: 2011-05-12 11:53:26 EDT (Thu, 12 May 2011)
New Revision: 71896
URL: http://svn.boost.org/trac/boost/changeset/71896
Log:
[phoenix]
- parallel_for example simplification
Text files modified:
trunk/boost/phoenix/core/detail/expression.hpp | 2 +-
trunk/boost/phoenix/stl/container/container.hpp | 8 ++++----
trunk/libs/phoenix/example/parallel_for.cpp | 12 ++++++------
3 files changed, 11 insertions(+), 11 deletions(-)
Modified: trunk/boost/phoenix/core/detail/expression.hpp
==============================================================================
--- trunk/boost/phoenix/core/detail/expression.hpp (original)
+++ trunk/boost/phoenix/core/detail/expression.hpp 2011-05-12 11:53:26 EDT (Thu, 12 May 2011)
@@ -98,7 +98,7 @@
{ \
EXPRESSION(NAME_SEQ, GRAMMAR_SEQ, DATA) \
typedef \
- proto::functional::make_expr< \
+ boost::proto::functional::make_expr< \
tag:: BOOST_PP_SEQ_HEAD(BOOST_PP_SEQ_REVERSE(NAME_SEQ)) \
> \
BOOST_PP_CAT( \
Modified: trunk/boost/phoenix/stl/container/container.hpp
==============================================================================
--- trunk/boost/phoenix/stl/container/container.hpp (original)
+++ trunk/boost/phoenix/stl/container/container.hpp 2011-05-12 11:53:26 EDT (Thu, 12 May 2011)
@@ -148,7 +148,7 @@
}
};
- struct at
+ struct at_impl
{
template <typename Sig>
struct result;
@@ -161,7 +161,7 @@
};
template <typename C, typename Index>
- typename result<at(C&, Index const&)>::type
+ typename result<at_impl(C&, Index const&)>::type
operator()(C& c, Index const &i) const
{
return c.at(i);
@@ -174,7 +174,7 @@
};
template <typename C, typename Index>
- typename result<at(C const&, Index const&)>::type
+ typename result<at_impl(C const&, Index const&)>::type
operator()(C const& c, Index const &i) const
{
return c.at(i);
@@ -789,7 +789,7 @@
BOOST_PHOENIX_ADAPT_CALLABLE(assign, boost::phoenix::stl::assign, 2)
BOOST_PHOENIX_ADAPT_CALLABLE(assign, boost::phoenix::stl::assign, 3)
BOOST_PHOENIX_ADAPT_CALLABLE(assign, boost::phoenix::stl::assign, 4)
- BOOST_PHOENIX_ADAPT_CALLABLE(at, stl::at, 2)
+ BOOST_PHOENIX_ADAPT_CALLABLE(at, ::boost::phoenix::stl::at_impl, 2)
BOOST_PHOENIX_ADAPT_CALLABLE(back, stl::back, 1)
BOOST_PHOENIX_ADAPT_CALLABLE(begin, stl::begin, 1)
BOOST_PHOENIX_ADAPT_CALLABLE(capacity, stl::capacity, 1)
Modified: trunk/libs/phoenix/example/parallel_for.cpp
==============================================================================
--- trunk/libs/phoenix/example/parallel_for.cpp (original)
+++ trunk/libs/phoenix/example/parallel_for.cpp 2011-05-12 11:53:26 EDT (Thu, 12 May 2011)
@@ -53,13 +53,13 @@
: init(init), cond(cond), step(step) {}
template <typename Do>
- typename expression::omp_for<Init, Cond, Step, Do>::type const
+ typename
+ boost::result_of<
+ expression::make_omp_for(Init, Cond, Step, Do)
+ >::type const
operator[](Do const& do_) const
{
- return
- expression::
- omp_for<Init, Cond, Step, Do>::
- make(init, cond, step, do_);
+ return expression::make_omp_for()(init, cond, step, do_);
}
Init init;
@@ -158,7 +158,7 @@
using boost::phoenix::lambda;
using boost::phoenix::nothing;
- const int NUM = 67108864;
+ const int NUM = 1;
{
std::vector<int> a(NUM, 1);
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk