Skip to content

Commit

Permalink
Merge branch 'master' into throw_with_info
Browse files Browse the repository at this point in the history
  • Loading branch information
hkaiser committed Jul 11, 2017
2 parents fc00f7e + 11bce88 commit 65cbc13
Show file tree
Hide file tree
Showing 54 changed files with 2,270 additions and 190 deletions.
20 changes: 15 additions & 5 deletions cmake/HPX_SetupVc.cmake
Expand Up @@ -34,16 +34,26 @@
# Vc_AVX_INTRINSICS_BROKEN

find_package(Vc ${Vc_FIND_VERSION} QUIET NO_MODULE PATHS ${Vc_ROOT})
if(NOT Vc_FOUND AND NOT HPX_WITH_DATAPAR_VC_NO_LIBRARY)
hpx_error("Vc was not found while datapar support was requested. Set Vc_ROOT to the installation path of Vc")

if(NOT Vc_FOUND)
if(NOT Vc_VERSION_STRING OR (${Vc_VERSION_STRING} VERSION_LESS "1.70.0"))
# didn't find any version of Vc
hpx_error("Vc was not found while datapar support was requested. Set Vc_ROOT to the installation path of Vc")
endif()
endif()

if(Vc_VERSION_STRING AND (NOT ${Vc_VERSION_STRING} VERSION_LESS "1.70.0"))
# found Vc V2
if(NOT Vc_INCLUDE_DIR)
hpx_error("Vc was not found while datapar support was requested. Set Vc_ROOT to the installation path of Vc")
endif()
set(HPX_WITH_DATAPAR_VC_NO_LIBRARY On)
endif()

include_directories(SYSTEM ${Vc_INCLUDE_DIR})
if(NOT HPX_WITH_DATAPAR_VC_NO_LIBRARY)
link_directories(${Vc_LIB_DIR})
endif()

if(NOT HPX_WITH_DATAPAR_VC_NO_LIBRARY)
hpx_library_dir(${Vc_LIB_DIR})
hpx_libraries(${Vc_LIBRARIES})
endif()
Expand Down Expand Up @@ -73,5 +83,5 @@ endif()
hpx_add_config_define(HPX_HAVE_DATAPAR)
hpx_add_config_define(HPX_HAVE_DATAPAR_VC)

hpx_info("Found Vc (vectorization): " ${Vc_INCLUDE_DIR})
hpx_info("Found Vc (vectorization):" ${Vc_INCLUDE_DIR} "- version:" ${Vc_VERSION_STRING})

2 changes: 2 additions & 0 deletions docs/CMakeLists.txt
Expand Up @@ -82,6 +82,7 @@ set(doxygen_dependencies
"${PROJECT_SOURCE_DIR}/hpx/parallel/algorithms/minmax.hpp"
"${PROJECT_SOURCE_DIR}/hpx/parallel/algorithms/mismatch.hpp"
"${PROJECT_SOURCE_DIR}/hpx/parallel/algorithms/move.hpp"
"${PROJECT_SOURCE_DIR}/hpx/parallel/algorithms/partition.hpp"
"${PROJECT_SOURCE_DIR}/hpx/parallel/algorithms/reduce.hpp"
"${PROJECT_SOURCE_DIR}/hpx/parallel/algorithms/reduce_by_key.hpp"
"${PROJECT_SOURCE_DIR}/hpx/parallel/algorithms/remove_copy.hpp"
Expand Down Expand Up @@ -110,6 +111,7 @@ set(doxygen_dependencies
"${PROJECT_SOURCE_DIR}/hpx/parallel/container_algorithms/for_each.hpp"
"${PROJECT_SOURCE_DIR}/hpx/parallel/container_algorithms/generate.hpp"
"${PROJECT_SOURCE_DIR}/hpx/parallel/container_algorithms/minmax.hpp"
"${PROJECT_SOURCE_DIR}/hpx/parallel/container_algorithms/partition.hpp"
"${PROJECT_SOURCE_DIR}/hpx/parallel/container_algorithms/remove_copy.hpp"
"${PROJECT_SOURCE_DIR}/hpx/parallel/container_algorithms/replace.hpp"
"${PROJECT_SOURCE_DIR}/hpx/parallel/container_algorithms/reverse.hpp"
Expand Down
65 changes: 46 additions & 19 deletions docs/manual/existing_performance_counters.qbk
Expand Up @@ -1291,23 +1291,29 @@ system and application performance.
[Returns the current average (mean) value calculated based on the values
queried from the underlying counter (the one specified as the instance
name).]
[Any parameter will be interpreted as the time interval (in
[Any parameter will be interpreted as a list of up to two comma separated
(integer) values, where the first is the time interval (in
milliseconds) at which the underlying counter should be queried. If
no value is specified, the counter will assume `1000` \[ms\] as the default.]
no value is specified, the counter will assume `1000` \[ms\] as the default.
The second value can be either `0` or `1` and specifies whether the
underlying counter should be reset during evaluation (`1`) or not (`0`).
The default value is `0`.]
]
[ [`/statistics/rolling_average`]
[Any full performance counter name. The referenced performance counter
is queried at fixed time intervals as specified by the first parameter.]
[Returns the current rolling average (mean) value calculated based on the values
queried from the underlying counter (the one specified as the instance
name).]
[Any parameter will be interpreted as a list of two comma separated (integer)
[Any parameter will be interpreted as a list of up to three comma separated (integer)
values, where the first is the time interval (in
milliseconds) at which the underlying counter should be queried. If
no value is specified, the counter will assume `1000` \[ms\] as the default.
The second value will be interpreted as the size of the rolling window
(the number of latest values to use to calculate the rolling average). The
default value for this is `10`.]
default value for this is `10`. The third value can be either `0` or `1`
and specifies whether the underlying counter should be reset during
evaluation (`1`) or not (`0`). The default value is `0`.]
]
[ [`/statistics/stddev`]
[Any full performance counter name. The referenced performance counter
Expand All @@ -1316,82 +1322,103 @@ system and application performance.
on the values queried from the underlying counter (the one specified
as the instance name). Note that this counter will be available only
for Boost V1.56 and newer.]
[Any parameter will be interpreted as the time interval (in
[Any parameter will be interpreted as a list of up to two comma separated
(integer) values, where the first is the time interval (in
milliseconds) at which the underlying counter should be queried. If
no value is specified, the counter will assume `1000` \[ms\] as the
default.]
no value is specified, the counter will assume `1000` \[ms\] as the default.
The second value can be either `0` or `1` and specifies whether the
underlying counter should be reset during evaluation (`1`) or not (`0`).
The default value is `0`.]
]
[ [`/statistics/rolling_stddev`]
[Any full performance counter name. The referenced performance counter
is queried at fixed time intervals as specified by the first parameter.]
[Returns the current rolling variance (stddev) value calculated based on
the values queried from the underlying counter (the one specified as
the instance name).]
[Any parameter will be interpreted as a list of two comma separated (integer)
[Any parameter will be interpreted as a list of up to three comma separated (integer)
values, where the first is the time interval (in
milliseconds) at which the underlying counter should be queried. If
no value is specified, the counter will assume `1000` \[ms\] as the default.
The second value will be interpreted as the size of the rolling window
(the number of latest values to use to calculate the rolling average). The
default value for this is `10`.]
default value for this is `10`. The third value can be either `0` or `1`
and specifies whether the underlying counter should be reset during
evaluation (`1`) or not (`0`). The default value is `0`.]
]
[ [`/statistics/median`]
[Any full performance counter name. The referenced performance counter
is queried at fixed time intervals as specified by the first parameter.]
[Returns the current (statistically estimated) median value calculated
based on the values queried from the underlying counter (the one
specified as the instance name).]
[Any parameter will be interpreted as the time interval (in
[Any parameter will be interpreted as a list of up to two comma separated
(integer) values, where the first is the time interval (in
milliseconds) at which the underlying counter should be queried. If
no value is specified, the counter will assume `1000` \[ms\] as the default.]
no value is specified, the counter will assume `1000` \[ms\] as the default.
The second value can be either `0` or `1` and specifies whether the
underlying counter should be reset during evaluation (`1`) or not (`0`).
The default value is `0`.]
]
[ [`/statistics/max`]
[Any full performance counter name. The referenced performance counter
is queried at fixed time intervals as specified by the first parameter.]
[Returns the current maximum value calculated based on the values
queried from the underlying counter (the one specified as the instance
name).]
[Any parameter will be interpreted as the time interval (in
[Any parameter will be interpreted as a list of up to two comma separated
(integer) values, where the first is the time interval (in
milliseconds) at which the underlying counter should be queried. If
no value is specified, the counter will assume `1000` \[ms\] as the default.]
no value is specified, the counter will assume `1000` \[ms\] as the default.
The second value can be either `0` or `1` and specifies whether the
underlying counter should be reset during evaluation (`1`) or not (`0`).
The default value is `0`.]
]
[ [`/statistics/rolling_max`]
[Any full performance counter name. The referenced performance counter
is queried at fixed time intervals as specified by the first parameter.]
[Returns the current rolling maximum value calculated based on
the values queried from the underlying counter (the one specified as
the instance name).]
[Any parameter will be interpreted as a list of two comma separated (integer)
[Any parameter will be interpreted as a list of up to three comma separated (integer)
values, where the first is the time interval (in
milliseconds) at which the underlying counter should be queried. If
no value is specified, the counter will assume `1000` \[ms\] as the default.
The second value will be interpreted as the size of the rolling window
(the number of latest values to use to calculate the rolling average). The
default value for this is `10`.]
default value for this is `10`. The third value can be either `0` or `1`
and specifies whether the underlying counter should be reset during
evaluation (`1`) or not (`0`). The default value is `0`.]
]
[ [`/statistics/min`]
[Any full performance counter name. The referenced performance counter
is queried at fixed time intervals as specified by the first parameter.]
[Returns the current minimum value calculated based on the values
queried from the underlying counter (the one specified as the instance
name).]
[Any parameter will be interpreted as the time interval (in
[Any parameter will be interpreted as a list of up to two comma separated
(integer) values, where the first is the time interval (in
milliseconds) at which the underlying counter should be queried. If
no value is specified, the counter will assume `1000` \[ms\] as the default.]
no value is specified, the counter will assume `1000` \[ms\] as the default.
The second value can be either `0` or `1` and specifies whether the
underlying counter should be reset during evaluation (`1`) or not (`0`).
The default value is `0`.]
]
[ [`/statistics/rolling_min`]
[Any full performance counter name. The referenced performance counter
is queried at fixed time intervals as specified by the first parameter.]
[Returns the current rolling minimum value calculated based on
the values queried from the underlying counter (the one specified as
the instance name).]
[Any parameter will be interpreted as a list of two comma separated (integer)
[Any parameter will be interpreted as a list of up to three comma separated (integer)
values, where the first is the time interval (in
milliseconds) at which the underlying counter should be queried. If
no value is specified, the counter will assume `1000` \[ms\] as the default.
The second value will be interpreted as the size of the rolling window
(the number of latest values to use to calculate the rolling average). The
default value for this is `10`.]
default value for this is `10`. The third value can be either `0` or `1`
and specifies whether the underlying counter should be reset during
evaluation (`1`) or not (`0`). The default value is `0`.]
]
]

Expand Down
24 changes: 19 additions & 5 deletions docs/manual/parallel_algorithms.qbk
Expand Up @@ -394,6 +394,25 @@ __hpx__ provides implementations of the following parallel algorithms:
]
]

[table Partitioning Operations (In Header: `<hpx/include/parallel_algorithm.hpp>`)
[[Name] [Description] [In Header] [Algorithm page at cppreference.com]]
[[ [algoref is_partitioned] ]
[Returns `true` if each true element for a predicate precedes the false elements in a range]
[`<hpx/include/parallel_is_partitioned.hpp>`]
[[cpprefalgodocs is_partitioned]]
]
[[ [algoref partition_copy] ]
[Copies a range dividing the elements into two groups ]
[`<hpx/include/parallel_partition.hpp>`]
[[cpprefalgodocs partition_copy]]
]
[[ [algoref stable_partition] ]
[Divides elements into two groups while preserving their relative order]
[`<hpx/include/parallel_partition.hpp>`]
[[cpprefalgodocs stable_partition]]
]
]

[table Sorting Operations (In Header: `<hpx/include/parallel_algorithm.hpp>`)
[[Name] [Description] [In Header] [Algorithm page at cppreference.com]]
[[ [algoref is_sorted] ]
Expand All @@ -406,11 +425,6 @@ __hpx__ provides implementations of the following parallel algorithms:
[`<hpx/include/parallel_is_sorted.hpp>`]
[[cpprefalgodocs is_sorted_until]]
]
[[ [algoref is_partitioned] ]
[Returns `true` if each true element for a predicate precedes the false elements in a range]
[`<hpx/include/parallel_is_partitioned.hpp>`]
[[cpprefalgodocs is_partitioned]]
]
[[ [algoref sort] ]
[Sorts the elements in a range]
[`<hpx/include/parallel_sort.hpp>`]
Expand Down
2 changes: 2 additions & 0 deletions docs/manual/vector.qbk
Expand Up @@ -212,3 +212,5 @@ Which is equivalent to:
}

[endsect]

[endsect]
Expand Up @@ -1167,7 +1167,7 @@ namespace hpx
//
// std::vector<future<void>> assign_lazy_sync;
// for (partition_description_type const& p,
// boost::make_iterator_range(partitions_.begin(),
// util::make_iterator_range(partitions_.begin(),
// partitions_.end() - 1)
// )
// {
Expand Down
6 changes: 3 additions & 3 deletions hpx/compute/host/block_executor.hpp
Expand Up @@ -16,11 +16,11 @@
#include <hpx/traits/executor_traits.hpp>
#include <hpx/traits/is_executor.hpp>
#include <hpx/util/deferred_call.hpp>
#include <hpx/util/iterator_range.hpp>
#include <hpx/util/range.hpp>
#include <hpx/util/unwrapped.hpp>

#include <boost/atomic.hpp>
#include <boost/range/iterator_range.hpp>

#include <algorithm>
#include <cstddef>
Expand Down Expand Up @@ -163,7 +163,7 @@ namespace hpx { namespace compute { namespace host
parallel::execution::bulk_async_execute(
executors_[i],
std::forward<F>(f),
boost::make_iterator_range(begin, part_end),
util::make_iterator_range(begin, part_end),
std::forward<Ts>(ts)...);
results.insert(
results.end(),
Expand Down Expand Up @@ -205,7 +205,7 @@ namespace hpx { namespace compute { namespace host
parallel::execution::bulk_sync_execute(
executors_[i],
std::forward<F>(f),
boost::make_iterator_range(begin, part_end),
util::make_iterator_range(begin, part_end),
std::forward<Ts>(ts)...);
results.insert(
results.end(),
Expand Down
2 changes: 2 additions & 0 deletions hpx/include/parallel_partition.hpp
@@ -1,4 +1,5 @@
// Copyright (c) 2007-2016 Hartmut Kaiser
// Copyright (c) 2017 Taeguk Kwon
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Expand All @@ -7,6 +8,7 @@
#define HPX_PARALLEL_PARTITION_SEP_24_2016_1054AM

#include <hpx/parallel/algorithms/partition.hpp>
#include <hpx/parallel/container_algorithms/partition.hpp>

#endif

0 comments on commit 65cbc13

Please sign in to comment.