hpx/thrust/algorithms.hpp#

Defined in header hpx/thrust/algorithms.hpp.

See Public API for a list of names and headers that are part of the public HPX API.

namespace hpx
namespace thrust#

Functions

template<typename Tag, typename ThrustPolicy, typename ...Args>
decltype(auto) hpx_invoke(Tag tag, ThrustPolicy &&policy, Args&&... args)#

ADL hook dispatching HPX algorithm CPOs to Thrust backends.

When a Thrust execution policy is passed to an HPX algorithm CPO, this hook maps the call to the corresponding Thrust implementation. Async policies wrap the result in a future.

Template Parameters
  • Tag – The algorithm CPO tag type.

  • ThrustPolicy – A Thrust execution policy satisfying is_thrust_execution_policy.

  • Args – Arguments forwarded to the Thrust algorithm.

Parameters
  • tag – The algorithm CPO tag instance.

  • policy – Thrust execution policy controlling dispatch.

  • args – Arguments forwarded to the mapped algorithm.

Returns

The algorithm result, or a future thereof for async policies.