Skip to content

Commit

Permalink
Merge pull request #2458 from STEllAR-GROUP/fixing_2439_2
Browse files Browse the repository at this point in the history
Replacing executor_information_traits
  • Loading branch information
hkaiser committed May 22, 2017
2 parents 87a6547 + e39cd05 commit 5aed010
Show file tree
Hide file tree
Showing 34 changed files with 617 additions and 49 deletions.
6 changes: 6 additions & 0 deletions hpx/include/parallel_executor_information.hpp
Expand Up @@ -6,6 +6,12 @@
#if !defined(HPX_PARALLEL_EXECUTOR_INFORMATION_DEC_07_2016_1145AM)
#define HPX_PARALLEL_EXECUTOR_INFORMATION_DEC_07_2016_1145AM

#include <hpx/config.hpp>

#if defined(HPX_HAVE_EXECUTOR_COMPATIBILITY)
#include <hpx/parallel/executors/executor_information_traits.hpp>
#endif
#include <hpx/parallel/executors/execution_information.hpp>
#include <hpx/parallel/executors/thread_execution_information.hpp>

#endif
7 changes: 3 additions & 4 deletions hpx/parallel/algorithms/detail/set_operation.hpp
Expand Up @@ -11,7 +11,7 @@

#include <hpx/parallel/config/inline_namespace.hpp>
#include <hpx/parallel/execution_policy.hpp>
#include <hpx/parallel/executors/executor_information_traits.hpp>
#include <hpx/parallel/executors/execution_information.hpp>
#include <hpx/parallel/util/detail/algorithm_result.hpp>
#include <hpx/parallel/util/foreach_partitioner.hpp>
#include <hpx/parallel/util/partitioner.hpp>
Expand Down Expand Up @@ -88,9 +88,8 @@ namespace hpx { namespace parallel { HPX_INLINE_NAMESPACE(v1) { namespace detail
boost::shared_array<buffer_type> buffer(
new buffer_type[combiner(len1, len2)]);

typedef typename ExPolicy::executor_type executor_type;
std::size_t cores = executor_information_traits<executor_type>::
processing_units_count(policy.executor(), policy.parameters());
std::size_t cores = execution::processing_units_count(
policy.executor(), policy.parameters());

std::size_t step = (len1 + cores - 1) / cores;
boost::shared_array<set_chunk_data> chunks(new set_chunk_data[cores]);
Expand Down
6 changes: 2 additions & 4 deletions hpx/parallel/algorithms/partition.hpp
Expand Up @@ -19,6 +19,7 @@
#include <hpx/parallel/config/inline_namespace.hpp>
#include <hpx/parallel/execution_policy.hpp>
#include <hpx/parallel/executors/execution.hpp>
#include <hpx/parallel/executors/execution_information.hpp>
#include <hpx/parallel/traits/projected.hpp>
#include <hpx/parallel/util/detail/algorithm_result.hpp>
#include <hpx/parallel/util/detail/handle_local_exceptions.hpp>
Expand Down Expand Up @@ -156,17 +157,14 @@ namespace hpx { namespace parallel { HPX_INLINE_NAMESPACE(v1)
result = hpx::make_ready_future(std::move(last));
}

typedef typename hpx::util::decay<ExPolicy>::type::executor_type
executor_type;
typedef typename
hpx::util::decay<ExPolicy>::type::executor_parameters_type
parameters_type;

typedef executor_parameter_traits<parameters_type> traits;
typedef executor_information_traits<executor_type> info_traits;

std::size_t const cores =
info_traits::processing_units_count(policy.executor(),
execution::processing_units_count(policy.executor(),
policy.parameters());
std::size_t max_chunks = traits::maximal_number_of_chunks(
policy.parameters(), policy.executor(), cores, size);
Expand Down
2 changes: 2 additions & 0 deletions hpx/parallel/execution.hpp
Expand Up @@ -11,6 +11,8 @@
#include <hpx/parallel/executors/thread_execution.hpp>
#include <hpx/parallel/executors/timed_execution.hpp>
#include <hpx/parallel/executors/thread_timed_execution.hpp>
#include <hpx/parallel/executors/execution_information.hpp>
#include <hpx/parallel/executors/thread_execution_information.hpp>

#endif

6 changes: 5 additions & 1 deletion hpx/parallel/executor_parameters.hpp
Expand Up @@ -6,12 +6,16 @@
#if !defined(HPX_PARALLEL_EXECUTOR_PARAMETERS_JUL_31_2015_0841PM)
#define HPX_PARALLEL_EXECUTOR_PARAMETERS_JUL_31_2015_0841PM

#include <hpx/config.hpp>

#include <hpx/parallel/executors/auto_chunk_size.hpp>
#include <hpx/parallel/executors/dynamic_chunk_size.hpp>
#include <hpx/parallel/executors/executor_parameter_traits.hpp>
#include <hpx/parallel/executors/guided_chunk_size.hpp>
#include <hpx/parallel/executors/persistent_auto_chunk_size.hpp>
#include <hpx/parallel/executors/static_chunk_size.hpp>
#if defined(HPX_HAVE_EXECUTOR_COMPATIBILITY)
#include <hpx/parallel/executors/executor_parameter_traits.hpp>
#include <hpx/parallel/executors/thread_executor_parameter_traits.hpp>
#endif

#endif
6 changes: 6 additions & 0 deletions hpx/parallel/executors.hpp
Expand Up @@ -6,14 +6,20 @@
#if !defined(HPX_PARALLEL_EXECUTORS_MAY_11_2015_0728PM)
#define HPX_PARALLEL_EXECUTORS_MAY_11_2015_0728PM

#include <hpx/config.hpp>

#if defined(HPX_HAVE_EXECUTOR_COMPATIBILITY)
#include <hpx/parallel/executors/executor_information_traits.hpp>
#endif
#include <hpx/parallel/executors/executor_parameter_traits.hpp>
#if defined(HPX_HAVE_EXECUTOR_COMPATIBILITY)
#include <hpx/parallel/executors/executor_traits.hpp>
#include <hpx/parallel/executors/timed_executor_traits.hpp>
#endif

#if defined(HPX_HAVE_EXECUTOR_COMPATIBILITY)
#include <hpx/parallel/executors/thread_executor_information_traits.hpp>
#endif
#include <hpx/parallel/executors/thread_executor_parameter_traits.hpp>
#if defined(HPX_HAVE_EXECUTOR_COMPATIBILITY)
#include <hpx/parallel/executors/thread_executor_traits.hpp>
Expand Down
1 change: 0 additions & 1 deletion hpx/parallel/executors/auto_chunk_size.hpp
Expand Up @@ -10,7 +10,6 @@

#include <hpx/config.hpp>
#include <hpx/parallel/config/inline_namespace.hpp>
#include <hpx/parallel/executors/executor_information_traits.hpp>
#include <hpx/parallel/executors/executor_parameter_traits.hpp>
#include <hpx/runtime/serialization/serialize.hpp>
#include <hpx/traits/is_executor_parameters.hpp>
Expand Down
2 changes: 2 additions & 0 deletions hpx/parallel/executors/default_executor.hpp
Expand Up @@ -10,6 +10,8 @@

#include <hpx/config.hpp>
#include <hpx/parallel/executors/thread_execution.hpp>
#include <hpx/parallel/executors/thread_execution_information.hpp>
#include <hpx/parallel/executors/thread_timed_execution.hpp>
#include <hpx/runtime/threads/executors/default_executor.hpp>

namespace hpx { namespace parallel { namespace execution
Expand Down
1 change: 0 additions & 1 deletion hpx/parallel/executors/dynamic_chunk_size.hpp
Expand Up @@ -10,7 +10,6 @@

#include <hpx/config.hpp>
#include <hpx/parallel/config/inline_namespace.hpp>
#include <hpx/parallel/executors/executor_traits.hpp>
#include <hpx/runtime/serialization/serialize.hpp>
#include <hpx/traits/is_executor_parameters.hpp>

Expand Down
2 changes: 1 addition & 1 deletion hpx/parallel/executors/execution.hpp
Expand Up @@ -19,10 +19,10 @@
#include <hpx/traits/future_then_result.hpp>
#include <hpx/traits/future_traits.hpp>
#include <hpx/traits/is_executor.hpp>
#include <hpx/traits/executor_traits.hpp>
#include <hpx/util/bind.hpp>
#include <hpx/util/deferred_call.hpp>
#include <hpx/util/detail/pack.hpp>
#include <hpx/util/detected.hpp>
#include <hpx/util/invoke.hpp>
#include <hpx/util/invoke.hpp>
#include <hpx/util/tuple.hpp>
Expand Down

0 comments on commit 5aed010

Please sign in to comment.