Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing boost preprocessor dependency #2771

Merged
merged 2 commits into from
Jul 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 11 additions & 9 deletions examples/accumulators/server/template_accumulator.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2007-2016 Hartmut Kaiser
// Copyright (c) 2007-2017 Hartmut Kaiser
// Copyright (c) 2011 Bryce Adelstein-Lelbach
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
Expand All @@ -10,6 +10,8 @@
#include <hpx/include/components.hpp>
#include <hpx/include/actions.hpp>

#include <hpx/util/detail/pp/cat.hpp>

///////////////////////////////////////////////////////////////////////////////
namespace examples { namespace server
{
Expand Down Expand Up @@ -88,34 +90,34 @@ namespace examples { namespace server
#define REGISTER_TEMPLATE_ACCUMULATOR_DECLARATION(type) \
HPX_REGISTER_ACTION_DECLARATION( \
examples::server::template_accumulator<type>::reset_action, \
BOOST_PP_CAT(__template_accumulator_reset_action_, type)); \
HPX_PP_CAT(__template_accumulator_reset_action_, type)); \
\
HPX_REGISTER_ACTION_DECLARATION( \
examples::server::template_accumulator<type>::add_action, \
BOOST_PP_CAT(__template_accumulator_add_action_, type)); \
HPX_PP_CAT(__template_accumulator_add_action_, type)); \
\
HPX_REGISTER_ACTION_DECLARATION( \
examples::server::template_accumulator<type>::query_action, \
BOOST_PP_CAT(__template_accumulator_query_action_, type)); \
HPX_PP_CAT(__template_accumulator_query_action_, type)); \
/**/

#define REGISTER_TEMPLATE_ACCUMULATOR(type) \
HPX_REGISTER_ACTION( \
examples::server::template_accumulator<type>::reset_action, \
BOOST_PP_CAT(__template_accumulator_reset_action_, type)); \
HPX_PP_CAT(__template_accumulator_reset_action_, type)); \
\
HPX_REGISTER_ACTION( \
examples::server::template_accumulator<type>::add_action, \
BOOST_PP_CAT(__template_accumulator_add_action_, type)); \
HPX_PP_CAT(__template_accumulator_add_action_, type)); \
\
HPX_REGISTER_ACTION( \
examples::server::template_accumulator<type>::query_action, \
BOOST_PP_CAT(__template_accumulator_query_action_, type)); \
HPX_PP_CAT(__template_accumulator_query_action_, type)); \
\
typedef ::hpx::components::component< \
examples::server::template_accumulator<type> \
> BOOST_PP_CAT(__template_accumulator_, type); \
HPX_REGISTER_COMPONENT(BOOST_PP_CAT(__template_accumulator_, type)) \
> HPX_PP_CAT(__template_accumulator_, type); \
HPX_REGISTER_COMPONENT(HPX_PP_CAT(__template_accumulator_, type)) \
/**/

#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@
#include <hpx/runtime/get_ptr.hpp>
#include <hpx/runtime/launch_policy.hpp>
#include <hpx/util/assert.hpp>
#include <hpx/util/detail/pp/cat.hpp>
#include <hpx/util/detail/pp/expand.hpp>
#include <hpx/util/detail/pp/nargs.hpp>

#include <hpx/components/containers/partitioned_vector/partitioned_vector_fwd.hpp>

#include <boost/preprocessor/cat.hpp>

#include <cstddef>
#include <iostream>
#include <memory>
Expand Down Expand Up @@ -406,28 +407,28 @@ namespace hpx { namespace server
HPX_REGISTER_VECTOR_DECLARATION_(__VA_ARGS__) \
/**/
#define HPX_REGISTER_VECTOR_DECLARATION_(...) \
HPX_UTIL_EXPAND_(BOOST_PP_CAT( \
HPX_REGISTER_VECTOR_DECLARATION_, HPX_UTIL_PP_NARG(__VA_ARGS__) \
HPX_PP_EXPAND(HPX_PP_CAT( \
HPX_REGISTER_VECTOR_DECLARATION_, HPX_PP_NARGS(__VA_ARGS__) \
)(__VA_ARGS__)) \
/**/

#define HPX_REGISTER_VECTOR_DECLARATION_IMPL(type, name) \
HPX_REGISTER_ACTION_DECLARATION(type::get_value_action, \
BOOST_PP_CAT(__vector_get_value_action_, name)); \
HPX_PP_CAT(__vector_get_value_action_, name)); \
HPX_REGISTER_ACTION_DECLARATION(type::get_values_action, \
BOOST_PP_CAT(__vector_get_values_action_, name)); \
HPX_PP_CAT(__vector_get_values_action_, name)); \
HPX_REGISTER_ACTION_DECLARATION(type::set_value_action, \
BOOST_PP_CAT(__vector_set_value_action_, name)); \
HPX_PP_CAT(__vector_set_value_action_, name)); \
HPX_REGISTER_ACTION_DECLARATION(type::set_values_action, \
BOOST_PP_CAT(__vector_set_values_action_, name)); \
HPX_PP_CAT(__vector_set_values_action_, name)); \
HPX_REGISTER_ACTION_DECLARATION(type::size_action, \
BOOST_PP_CAT(__vector_size_action_, name)); \
HPX_PP_CAT(__vector_size_action_, name)); \
HPX_REGISTER_ACTION_DECLARATION(type::resize_action, \
BOOST_PP_CAT(__vector_resize_action_, name)); \
HPX_PP_CAT(__vector_resize_action_, name)); \
HPX_REGISTER_ACTION_DECLARATION(type::get_copied_data_action, \
BOOST_PP_CAT(__vector_get_copied_data_action_, name)); \
HPX_PP_CAT(__vector_get_copied_data_action_, name)); \
HPX_REGISTER_ACTION_DECLARATION(type::set_data_action, \
BOOST_PP_CAT(__vector_set_data_action_, name)); \
HPX_PP_CAT(__vector_set_data_action_, name)); \
/**/

#define HPX_REGISTER_VECTOR_DECLARATION_1(type) \
Expand All @@ -438,39 +439,39 @@ namespace hpx { namespace server
/**/
#define HPX_REGISTER_VECTOR_DECLARATION_3(type, data, name) \
typedef ::hpx::server::partitioned_vector<type, data> \
BOOST_PP_CAT(__partitioned_vector_, BOOST_PP_CAT(type, name)); \
HPX_PP_CAT(__partitioned_vector_, HPX_PP_CAT(type, name)); \
HPX_REGISTER_VECTOR_DECLARATION_IMPL( \
BOOST_PP_CAT(__partitioned_vector_, BOOST_PP_CAT(type, name)), name) \
HPX_PP_CAT(__partitioned_vector_, HPX_PP_CAT(type, name)), name) \
/**/

#define HPX_REGISTER_PARTITIONED_VECTOR(...) \
HPX_REGISTER_VECTOR_(__VA_ARGS__) \
/**/
#define HPX_REGISTER_VECTOR_(...) \
HPX_UTIL_EXPAND_(BOOST_PP_CAT( \
HPX_REGISTER_VECTOR_, HPX_UTIL_PP_NARG(__VA_ARGS__) \
HPX_PP_EXPAND(HPX_PP_CAT( \
HPX_REGISTER_VECTOR_, HPX_PP_NARGS(__VA_ARGS__) \
)(__VA_ARGS__)) \
/**/

#define HPX_REGISTER_VECTOR_IMPL(type, name) \
HPX_REGISTER_ACTION(type::get_value_action, \
BOOST_PP_CAT(__vector_get_value_action_, name)); \
HPX_PP_CAT(__vector_get_value_action_, name)); \
HPX_REGISTER_ACTION(type::get_values_action, \
BOOST_PP_CAT(__vector_get_values_action_, name)); \
HPX_PP_CAT(__vector_get_values_action_, name)); \
HPX_REGISTER_ACTION(type::set_value_action, \
BOOST_PP_CAT(__vector_set_value_action_, name)); \
HPX_PP_CAT(__vector_set_value_action_, name)); \
HPX_REGISTER_ACTION(type::set_values_action, \
BOOST_PP_CAT(__vector_set_values_action_, name)); \
HPX_PP_CAT(__vector_set_values_action_, name)); \
HPX_REGISTER_ACTION(type::size_action, \
BOOST_PP_CAT(__vector_size_action_, name)); \
HPX_PP_CAT(__vector_size_action_, name)); \
HPX_REGISTER_ACTION(type::resize_action, \
BOOST_PP_CAT(__vector_resize_action_, name)); \
HPX_PP_CAT(__vector_resize_action_, name)); \
HPX_REGISTER_ACTION(type::get_copied_data_action, \
BOOST_PP_CAT(__vector_get_copied_data_action_, name)); \
HPX_PP_CAT(__vector_get_copied_data_action_, name)); \
HPX_REGISTER_ACTION(type::set_data_action, \
BOOST_PP_CAT(__vector_set_data_action_, name)); \
typedef ::hpx::components::component<type> BOOST_PP_CAT(__vector_, name); \
HPX_REGISTER_COMPONENT(BOOST_PP_CAT(__vector_, name)) \
HPX_PP_CAT(__vector_set_data_action_, name)); \
typedef ::hpx::components::component<type> HPX_PP_CAT(__vector_, name); \
HPX_REGISTER_COMPONENT(HPX_PP_CAT(__vector_, name)) \
/**/

#define HPX_REGISTER_VECTOR_1(type) \
Expand All @@ -481,9 +482,9 @@ namespace hpx { namespace server
/**/
#define HPX_REGISTER_VECTOR_3(type, data, name) \
typedef ::hpx::server::partitioned_vector<type, data> \
BOOST_PP_CAT(__partitioned_vector_, BOOST_PP_CAT(type, name)); \
HPX_PP_CAT(__partitioned_vector_, HPX_PP_CAT(type, name)); \
HPX_REGISTER_VECTOR_IMPL( \
BOOST_PP_CAT(__partitioned_vector_, BOOST_PP_CAT(type, name)), name) \
HPX_PP_CAT(__partitioned_vector_, HPX_PP_CAT(type, name)), name) \
/**/

///////////////////////////////////////////////////////////////////////////////
Expand Down