Skip to content

Commit

Permalink
Updating docs
Browse files Browse the repository at this point in the history
  • Loading branch information
StellarBot committed Jul 7, 2017
1 parent 9ed5c8b commit 8eb9974
Show file tree
Hide file tree
Showing 595 changed files with 4,479 additions and 4,497 deletions.
2 changes: 1 addition & 1 deletion docs/html/HPX_DEFINE_COMPONENT_ACTION.html
Expand Up @@ -26,7 +26,7 @@ <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="re

</span>HPX_DEFINE_COMPONENT_ACTION(...)</pre></div>
<div class="refsect1">
<a name="idm139734168856368"></a><h2>Description</h2>
<a name="idm140005374182064"></a><h2>Description</h2>
<p>The macro <span class="emphasis"><em>HPX_DEFINE_COMPONENT_ACTION</em></span> can be used to register a member function of a component as an action type named <span class="emphasis"><em>action_type</em></span>.</p>
<p>The parameter <span class="emphasis"><em>component</em></span> is the type of the component exposing the member function <span class="emphasis"><em>func</em></span> which should be associated with the newly defined action type. The parameter <code class="computeroutput">action_type</code> is the name of the action type to register with HPX.</p>
<p><b>Example:&#160;</b></p>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/HPX_DEFINE_PLAIN_ACTION.html
Expand Up @@ -26,7 +26,7 @@ <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="re

</span>HPX_DEFINE_PLAIN_ACTION(...)</pre></div>
<div class="refsect1">
<a name="idm139734168796224"></a><h2>Description</h2>
<a name="idm140005374122048"></a><h2>Description</h2>
<p><b>Example:&#160;</b></p>
<p>
</p>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/HPX_PLAIN_ACTION.html
Expand Up @@ -26,7 +26,7 @@ <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="re

</span>HPX_PLAIN_ACTION(...)</pre></div>
<div class="refsect1">
<a name="idm139734168759408"></a><h2>Description</h2>
<a name="idm140005374085200"></a><h2>Description</h2>
<p>The macro <span class="emphasis"><em>HPX_PLAIN_ACTION</em></span> can be used to define a plain action (e.g. an action encapsulating a global or free function) based on the given function <span class="emphasis"><em>func</em></span>. It defines the action type <span class="emphasis"><em>name</em></span> representing the given function. This macro additionally registers the newly define action type with HPX.</p>
<p>The parameter <code class="computeroutput">func</code> is a global or free (non-member) function which should be encapsulated into a plain action. The parameter <code class="computeroutput">name</code> is the name of the action type defined by this macro.</p>
<p><b>Example:&#160;</b></p>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/HPX_PLAIN_ACTION_ID.html
Expand Up @@ -26,7 +26,7 @@ <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="re

</span>HPX_PLAIN_ACTION_ID(func, name, id)</pre></div>
<div class="refsect1">
<a name="idm139734168720480"></a><h2>Description</h2>
<a name="idm140005374046272"></a><h2>Description</h2>
<p>The macro <span class="emphasis"><em>HPX_PLAIN_ACTION_ID</em></span> can be used to define a plain action (e.g. an action encapsulating a global or free function) based on the given function <span class="emphasis"><em>func</em></span>. It defines the action type <span class="emphasis"><em>actionname</em></span> representing the given function. The parameter <span class="emphasis"><em>actionid</em></span> </p>
<p>The parameter <span class="emphasis"><em>actionid</em></span> specifies an unique integer value which will be used to represent the action during serialization.</p>
<p>The parameter <code class="computeroutput">func</code> is a global or free (non-member) function which should be encapsulated into a plain action. The parameter <code class="computeroutput">name</code> is the name of the action type defined by this macro.</p>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/HPX_REGISTER_ACTION.html
Expand Up @@ -26,7 +26,7 @@ <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="re

</span>HPX_REGISTER_ACTION(...)</pre></div>
<div class="refsect1">
<a name="idm139734168882208"></a><h2>Description</h2>
<a name="idm140005374207712"></a><h2>Description</h2>
<p>The macro <span class="emphasis"><em>HPX_REGISTER_ACTION</em></span> can be used to define all the boilerplate code which is required for proper functioning of component actions in the context of HPX.</p>
<p>The parameter <span class="emphasis"><em>action</em></span> is the type of the action to define the boilerplate for.</p>
<p>This macro can be invoked with an optional second parameter. This parameter specifies a unique name of the action to be used for serialization purposes. The second parameter has to be specified if the first parameter is not usable as a plain (non-qualified) C++ identifier, i.e. the first parameter contains special characters which cannot be part of a C++ identifier, such as '&lt;', '&gt;', or ':'.</p>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/HPX_REGISTER_ACTION_DECLARATION.html
Expand Up @@ -26,7 +26,7 @@ <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="re

</span>HPX_REGISTER_ACTION_DECLARATION(...)</pre></div>
<div class="refsect1">
<a name="idm139734168941760"></a><h2>Description</h2>
<a name="idm140005374267216"></a><h2>Description</h2>
<p>The macro <span class="emphasis"><em>HPX_REGISTER_ACTION_DECLARATION</em></span> can be used to declare all the boilerplate code which is required for proper functioning of component actions in the context of HPX.</p>
<p>The parameter <span class="emphasis"><em>action</em></span> is the type of the action to declare the boilerplate for.</p>
<p>This macro can be invoked with an optional second parameter. This parameter specifies a unique name of the action to be used for serialization purposes. The second parameter has to be specified if the first parameter is not usable as a plain (non-qualified) C++ identifier, i.e. the first parameter contains special characters which cannot be part of a C++ identifier, such as '&lt;', '&gt;', or ':'.</p>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/HPX_REGISTER_ACTION_ID.html
Expand Up @@ -26,7 +26,7 @@ <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="re

</span>HPX_REGISTER_ACTION_ID(action, actionname, actionid)</pre></div>
<div class="refsect1">
<a name="idm139734168871648"></a><h2>Description</h2>
<a name="idm140005374197216"></a><h2>Description</h2>
<p>The macro <span class="emphasis"><em>HPX_REGISTER_ACTION</em></span> can be used to define all the boilerplate code which is required for proper functioning of component actions in the context of HPX.</p>
<p>The parameter <span class="emphasis"><em>action</em></span> is the type of the action to define the boilerplate for.</p>
<p>The parameter <span class="emphasis"><em>actionname</em></span> specifies an unique name of the action to be used for serialization purposes. The second parameter has to be usable as a plain (non-qualified) C++ identifier, it should not contain special characters which cannot be part of a C++ identifier, such as '&lt;', '&gt;', or ':'.</p>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/HPX_REGISTER_COMPONENT.html
Expand Up @@ -26,7 +26,7 @@ <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="re

</span>HPX_REGISTER_COMPONENT(type, name, mode)</pre></div>
<div class="refsect1">
<a name="idm139734167551664"></a><h2>Description</h2>
<a name="idm140005372878768"></a><h2>Description</h2>
<p>This macro is used create and to register a minimal component factory for a component type which allows it to be remotely created using the <span class="emphasis"><em>hpx::new_&lt;&gt;</em></span> function.</p>
<p>This macro can be invoked with one, two or three arguments</p>
<p>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/HPX_THROWS_IF.html
Expand Up @@ -26,7 +26,7 @@ <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="re

</span>HPX_THROWS_IF(ec, errcode, f, msg)</pre></div>
<div class="refsect1">
<a name="idm139734162509440"></a><h2>Description</h2>
<a name="idm140005367913296"></a><h2>Description</h2>
<p>The macro <span class="emphasis"><em>HPX_THROWS_IF</em></span> can be used to either throw a <span class="emphasis"><em><a class="link" href="hpx/exception.html" title="Class exception">hpx::exception</a></em></span> or to initialize a <span class="emphasis"><em><a class="link" href="hpx/error_code.html" title="Class error_code">hpx::error_code</a></em></span> from the given parameters. If &amp;ec == &amp;hpx::throws, the semantics of this macro are equivalent to <span class="emphasis"><em>HPX_THROW_EXCEPTION</em></span>. If &amp;ec != &amp;hpx::throws, the <span class="emphasis"><em><a class="link" href="hpx/error_code.html" title="Class error_code">hpx::error_code</a></em></span> instance <code class="computeroutput">ec</code> is initialized instead.</p>
<p>The parameter <code class="computeroutput">errcode</code> holds the hpx::error code from which the new exception should be initialized. The parameter <code class="computeroutput">f</code> is expected to hold the name of the function exception is thrown from and the parameter <code class="computeroutput">msg</code> holds the error message the new exception should encapsulate. </p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/HPX_THROW_EXCEPTION.html
Expand Up @@ -26,7 +26,7 @@ <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="re

</span>HPX_THROW_EXCEPTION(errcode, f, msg)</pre></div>
<div class="refsect1">
<a name="idm139734162536384"></a><h2>Description</h2>
<a name="idm140005367943296"></a><h2>Description</h2>
<p>The macro <span class="emphasis"><em>HPX_THROW_EXCEPTION</em></span> can be used to throw a <a class="link" href="hpx/exception.html" title="Class exception">hpx::exception</a>. The purpose of this macro is to prepend the source file name and line number of the position where the exception is thrown to the error message. Moreover, this associates additional diagnostic information with the exception, such as file name and line number, locality id and thread id, and stack backtrace from the point where the exception was thrown.</p>
<p>The parameter <code class="computeroutput">errcode</code> holds the hpx::error code the new exception should encapsulate. The parameter <code class="computeroutput">f</code> is expected to hold the name of the function exception is thrown from and the parameter <code class="computeroutput">msg</code> holds the error message the new exception should encapsulate.</p>
<p><b>Example:&#160;</b></p>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/code/examples/1d_stencil/1d_stencil_4.cpp
Expand Up @@ -144,7 +144,7 @@ struct stepper
std::size_t b = 0;
auto range = boost::irange(b, np);
using hpx::parallel::execution::par;
hpx::parallel::for_each(par, boost::begin(range), boost::end(range),
hpx::parallel::for_each(par, std::begin(range), std::end(range),
[&U, nx](std::size_t i)
{
U[0][i] = hpx::make_ready_future(partition_data(nx, double(i)));
Expand Down
6 changes: 3 additions & 3 deletions docs/html/code/hpx/lcos/wait_all.hpp
Expand Up @@ -114,11 +114,11 @@ namespace hpx
#include <hpx/util/always_void.hpp>
#include <hpx/util/decay.hpp>
#include <hpx/util/deferred_call.hpp>
#include <hpx/util/range.hpp>
#include <hpx/util/tuple.hpp>
#include <hpx/util/unwrap_ref.hpp>

#include <boost/intrusive_ptr.hpp>
#include <boost/range/functions.hpp>
#include <boost/ref.hpp>

#include <algorithm>
Expand Down Expand Up @@ -284,8 +284,8 @@ namespace hpx { namespace lcos
void await_next(std::false_type, std::true_type)
{
await_range<I>(
boost::begin(util::unwrap_ref(util::get<I>(t_))),
boost::end(util::unwrap_ref(util::get<I>(t_))));
util::begin(util::unwrap_ref(util::get<I>(t_))),
util::end(util::unwrap_ref(util::get<I>(t_))));
}

// Current element is a simple future
Expand Down
55 changes: 31 additions & 24 deletions docs/html/code/hpx/lcos/when_all.hpp
Expand Up @@ -140,16 +140,17 @@ namespace hpx
#include <hpx/lcos/when_some.hpp>
#include <hpx/traits/acquire_future.hpp>
#include <hpx/traits/acquire_shared_state.hpp>
#include <hpx/traits/detail/reserve.hpp>
#include <hpx/traits/future_access.hpp>
#include <hpx/traits/is_future.hpp>
#include <hpx/traits/is_future_range.hpp>
#include <hpx/util/decay.hpp>
#include <hpx/util/deferred_call.hpp>
#include <hpx/util/range.hpp>
#include <hpx/util/tuple.hpp>
#include <hpx/util/unwrap_ref.hpp>

#include <boost/intrusive_ptr.hpp>
#include <boost/range/functions.hpp>

#include <algorithm>
#include <cstddef>
Expand Down Expand Up @@ -280,8 +281,8 @@ namespace hpx { namespace lcos
void await_next(std::false_type, std::true_type)
{
await_range<I>(
boost::begin(util::unwrap_ref(util::get<I>(t_))),
boost::end(util::unwrap_ref(util::get<I>(t_))));
util::begin(util::unwrap_ref(util::get<I>(t_))),
util::end(util::unwrap_ref(util::get<I>(t_))));
}

// Current element is a simple future
Expand Down Expand Up @@ -356,46 +357,43 @@ namespace hpx { namespace lcos
template <typename Range>
typename std::enable_if<traits::is_future_range<Range>::value,
lcos::future<typename std::decay<Range>::type> >::type //-V659
when_all(Range&& values)
when_all(Range&& lazy_values)
{
typedef detail::when_all_frame<util::tuple<Range> > frame_type;
typedef typename std::decay<Range>::type result_type;

result_type lazy_values_ = traits::acquire_future<result_type>()(lazy_values);

typedef detail::when_all_frame<
util::tuple<result_type>
> frame_type;
typedef typename frame_type::init_no_addref init_no_addref;

boost::intrusive_ptr<frame_type> p(new frame_type(
util::forward_as_tuple(std::move(values)), init_no_addref()),
util::forward_as_tuple(std::move(lazy_values_)), init_no_addref()),
false);
p->do_await();

using traits::future_access;
return future_access<typename frame_type::type>::create(std::move(p));
}

template <typename Range>
typename std::enable_if<traits::is_future_range<Range>::value,
lcos::future<typename std::decay<Range>::type> >::type
when_all(Range& values)
{
Range values_ = traits::acquire_future<Range>()(values);
return lcos::when_all(std::move(values_));
}

template <typename Iterator, typename Container =
std::vector<typename lcos::detail::future_iterator_traits<Iterator>::type> >
lcos::future<Container>
when_all(Iterator begin, Iterator end)
{
Container values;
Container lazy_values_;

typename std::iterator_traits<Iterator>::
difference_type difference = std::distance(begin, end);
if (difference > 0)
traits::detail::reserve_if_vector(
values, static_cast<std::size_t>(difference));
lazy_values_, static_cast<std::size_t>(difference));

std::transform(begin, end, std::back_inserter(values),
std::transform(begin, end, std::back_inserter(lazy_values_),
traits::acquire_future_disp());

return lcos::when_all(std::move(values));
return lcos::when_all(std::move(lazy_values_));
}

inline lcos::future<util::tuple<> > //-V524
Expand All @@ -422,20 +420,29 @@ namespace hpx { namespace lcos
}

///////////////////////////////////////////////////////////////////////////
template <typename... Ts>
typename detail::when_all_frame<
util::tuple<typename traits::acquire_future<Ts>::type...>
template <typename T, typename... Ts>
typename std::enable_if<
!(traits::is_future_range<T>::value && sizeof...(Ts) == 0),
typename detail::when_all_frame<
util::tuple<
typename traits::acquire_future<T>::type,
typename traits::acquire_future<Ts>::type...
>
>::type
>::type
when_all(Ts&&... ts)
when_all(T&& t, Ts&&... ts)
{
typedef util::tuple<
typename traits::acquire_future<T>::type,
typename traits::acquire_future<Ts>::type...
> result_type;
typedef detail::when_all_frame<result_type> frame_type;
typedef typename frame_type::init_no_addref init_no_addref;

traits::acquire_future_disp func;
result_type values(func(std::forward<Ts>(ts))...);
result_type values(
func(std::forward<T>(t)),
func(std::forward<Ts>(ts))...);

boost::intrusive_ptr<frame_type> p(
new frame_type(std::move(values), init_no_addref()), false);
Expand Down
37 changes: 20 additions & 17 deletions docs/html/code/hpx/lcos/when_any.hpp
Expand Up @@ -126,6 +126,7 @@ namespace hpx
#include <hpx/lcos/when_any.hpp>
#include <hpx/runtime/threads/thread.hpp>
#include <hpx/traits/acquire_future.hpp>
#include <hpx/traits/detail/reserve.hpp>
#include <hpx/traits/future_access.hpp>
#include <hpx/traits/is_future.hpp>
#include <hpx/traits/is_future_range.hpp>
Expand Down Expand Up @@ -372,9 +373,10 @@ namespace hpx { namespace lcos
template <typename Range>
typename std::enable_if<traits::is_future_range<Range>::value,
lcos::future<when_any_result<typename std::decay<Range>::type> > >::type
when_any(Range& lazy_values)
when_any(Range&& lazy_values)
{
typedef Range result_type;
typedef typename std::decay<Range>::type result_type;

result_type lazy_values_ = traits::acquire_future<result_type>()(lazy_values);

std::shared_ptr<detail::when_any<result_type> > f =
Expand All @@ -388,14 +390,6 @@ namespace hpx { namespace lcos
return p.get_future();
}

template <typename Range>
typename std::enable_if<traits::is_future_range<Range>::value,
lcos::future<when_any_result<typename std::decay<Range>::type> > >::type
when_any(Range&& lazy_values)
{
return lcos::when_any(lazy_values);
}

template <typename Iterator, typename Container =
std::vector<typename lcos::detail::future_iterator_traits<Iterator>::type> >
lcos::future<when_any_result<Container> >
Expand All @@ -412,7 +406,7 @@ namespace hpx { namespace lcos
std::transform(begin, end, std::back_inserter(lazy_values_),
traits::acquire_future_disp());

return lcos::when_any(lazy_values_);
return lcos::when_any(std::move(lazy_values_));
}

inline lcos::future<when_any_result<util::tuple<> > > //-V524
Expand Down Expand Up @@ -440,18 +434,27 @@ namespace hpx { namespace lcos
}

///////////////////////////////////////////////////////////////////////////
template <typename... Ts>
lcos::future<when_any_result<
util::tuple<typename traits::acquire_future<Ts>::type...>
> >
when_any(Ts&&... ts)
template <typename T, typename... Ts>
typename std::enable_if<
!(traits::is_future_range<T>::value && sizeof...(Ts) == 0),
lcos::future<when_any_result<
util::tuple<
typename traits::acquire_future<T>::type,
typename traits::acquire_future<Ts>::type...
>
> >
>::type
when_any(T&& t, Ts&&... ts)
{
typedef util::tuple<
typename traits::acquire_future<T>::type,
typename traits::acquire_future<Ts>::type...
> result_type;

traits::acquire_future_disp func;
result_type lazy_values(func(std::forward<Ts>(ts))...);
result_type lazy_values(
func(std::forward<T>(t)),
func(std::forward<Ts>(ts))...);

std::shared_ptr<detail::when_any<result_type> > f =
std::make_shared<detail::when_any<result_type> >(
Expand Down
6 changes: 3 additions & 3 deletions docs/html/code/hpx/lcos/when_each.hpp
Expand Up @@ -139,11 +139,11 @@ namespace hpx
#include <hpx/util/decay.hpp>
#include <hpx/util/deferred_call.hpp>
#include <hpx/util/detail/pack.hpp>
#include <hpx/util/range.hpp>
#include <hpx/util/tuple.hpp>
#include <hpx/util/unwrap_ref.hpp>

#include <boost/intrusive_ptr.hpp>
#include <boost/range/functions.hpp>

#include <algorithm>
#include <cstddef>
Expand Down Expand Up @@ -273,8 +273,8 @@ namespace hpx { namespace lcos
void await_next(std::false_type, std::true_type)
{
await_range<I>(
boost::begin(util::unwrap_ref(util::get<I>(t_))),
boost::end(util::unwrap_ref(util::get<I>(t_))));
util::begin(util::unwrap_ref(util::get<I>(t_))),
util::end(util::unwrap_ref(util::get<I>(t_))));
}

// Current element is a simple future
Expand Down

0 comments on commit 8eb9974

Please sign in to comment.