This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// after my ctrl+s format | |
namespace hpx { | |
namespace parallel { | |
inline namespace v1 { | |
/////////////////////////////////////////////////////////////////////////// | |
// copy | |
namespace detail { | |
/// \cond NOINTERNAL | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <hpx/type_support/always_void.hpp> | |
#include <hpx/iterator_support/traits/is_iterator.hpp> | |
#include <utility> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <hpx/iterator_support/traits/is_sentinel_for.hpp> | |
#include <hpx/testing.hpp> | |
#include "iter_sent.hpp" | |
void is_sentinel_for() | |
{ | |
HPX_TEST_MSG((hpx::traits::is_sentinel_for<Iterator<std::int64_t>{0}, Sentinel<int64_t>{100}>::value == true), "sent for iter"); | |
} | |
/////////////////////////////////////////////////////////////////////////////// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HPX_TEST_MSG((hpx::traits::is_sentinel_for<std::vector<int>::iterator, | |
std::vector<int>::iterator>::value == true), | |
"iterator being / end pair"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/home/john/hpx_is_sentinel_for/libs/performance_counters/src/performance_counter_set.cpp: In member function ‘std::vector<hpx::performance_counters::counter_value> hpx::performance_counters::performance_counter_set::get_counter_values(hpx::launch::sync_policy, bool, hpx::error_code&) const’: | |
/home/john/hpx_is_sentinel_for/libs/performance_counters/src/performance_counter_set.cpp:337:37: error: could not convert ‘hpx::util::unwrap(Args&& ...) [with Args = {std::vector<hpx::lcos::future<hpx::performance_counters::counter_value>, std::allocator<hpx::lcos::future<hpx::performance_counters::counter_value> > >}; decltype (unwrap_depth_impl<1>((forward<Args>)(hpx::util::unwrap::args)...)) = std::vector<hpx::lcos::future<hpx::performance_counters::counter_value> >]()’ from ‘std::vector<hpx::lcos::future<hpx::performance_counters::counter_value> >’ to ‘std::vector<hpx::performance_counters::counter_value>’ | |
return hpx::util::unwrap(get_counter_values(reset)); | |
~~~~~~~~~~~~~~~~~^~~~~~~~~~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <disable_sized_sentinel_for> | |
int main() | |
{ | |
inline constexpr bool b = std::disable_sized_sentinel_for<void, void>; | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/home/giannis/foreach_adapt/libs/algorithms/include/hpx/parallel/util/detail/algorithm_result.hpp: In instantiation of ‘static hpx::parallel::util::detail::algorithm_result_impl<ExPolicy, T>::type hpx::parallel::util::detail::algorithm_result_impl<ExPolicy, T>::get(T_&&) [with T_ = Sentinel<long int>; ExPolicy = hpx::parallel::execution::sequenced_policy; T = Iterator<long int>; hpx::parallel::util::detail::algorithm_result_impl<ExPolicy, T>::type = Iterator<long int>]’: | |
/home/giannis/foreach_adapt/libs/algorithms/include/hpx/parallel/algorithms/for_each.hpp:427:35: required from ‘typename hpx::parallel::util::detail::algorithm_result<ExPolicy, T>::type hpx::parallel::v1::detail::for_each_(ExPolicy&&, FwdIterB, FwdIterE, F&&, Proj&&, std::false_type) [with ExPolicy = const hpx::parallel::execution::sequenced_policy&; FwdIterB = Iterator<long int>; FwdIterE = Sentinel<long int>; F = void (&)(int); Proj = hpx::parallel::util::projection_identity; typename hpx::parallel::util::detail::algorithm_result<ExPolicy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <hpx/hpx_main.hpp> | |
#include <hpx/include/parallel_for_each.hpp> | |
#include <hpx/modules/testing.hpp> | |
#include "iter_sent.hpp" | |
#include <cstddef> | |
#include <cstdint> | |
#include <iterator> | |
#include <iostream> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In file included from /home/giannis/foreach_adapt/libs/include/include/hpx/include/parallel_for_each.hpp:10, | |
from /home/giannis/foreach_adapt/libs/algorithms/tests/unit/container_algorithms/foreach_adapt.cpp:2: | |
/home/giannis/foreach_adapt/libs/algorithms/include/hpx/parallel/algorithms/for_each.hpp: In instantiation of ‘static typename std::enable_if<(! hpx::traits::is_random_access_iterator<InIterB>::value), InIterB>::type hpx::parallel::v1::detail::for_each<Iter>::sequential(ExPolicy&&, InIterB, InIterE, F&&, Proj&&) [with ExPolicy = const hpx::parallel::execution::sequenced_policy&; InIterB = Iterator<long int>; InIterE = Sentinel<long int>; F = void (&)(int); Proj = hpx::parallel::util::projection_identity; Iter = Iterator<long int>; typename std::enable_if<(! hpx::traits::is_random_access_iterator<InIterB>::value), InIterB>::type = Iterator<long int>]’: | |
/home/giannis/foreach_adapt/libs/algorithms/include/hpx/parallel/algorithms/detail/dispatch.hpp:108:44: required from ‘typename hpx::p |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace detail { | |
template <typename Iter> | |
struct transform_loop | |
{ | |
template <typename InIterB, typename InIterE, typename OutIter, typename F> | |
HPX_HOST_DEVICE HPX_FORCEINLINE static util::in_out_result<InIterB, OutIter> | |
call(InIterB first, InIterE last, OutIter dest, F&& f) | |
{ | |
for (/* */; first != last; (void) ++first, ++dest) | |
{ |
OlderNewer