hpx/async_sycl/sycl_executor.hpp#

Defined in header hpx/async_sycl/sycl_executor.hpp.

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

namespace hpx

Functions

template<typename Executor, typename ...Ts>
decltype(auto) async(Executor &&exec, hpx::sycl::experimental::sycl_executor::queue_function_ptr_t<Ts...> &&f, Ts&&... ts)#

hpx::async overload for launching sycl queue member functions with an sycl executor

template<typename Executor, typename ...Ts>
bool apply(Executor &&exec, hpx::sycl::experimental::sycl_executor::queue_function_ptr_t<Ts...> &&f, Ts&&... ts)#

hpx::apply overload for launching sycl queue member functions with an sycl executor

namespace parallel
namespace execution
namespace sycl#
namespace experimental#
struct sycl_executor#

Public Types

using future_type = hpx::future<void>#
template<typename ...Params>
using queue_function_ptr_t = cl::sycl::event (cl::sycl::queue::*)(std::conditional_t<std::is_trivial_v<std::remove_reference_t<Params>>, std::decay_t<Params>, Params>...)#

Default Implementation without the extra intel code_location parameter. Removes the reference for trivial types to make the function matching easier (see sycl_stream.cpp test)

Public Functions

inline explicit sycl_executor(cl::sycl::default_selector selector)#

Create a SYCL executor (based on a sycl queue)

~sycl_executor() = default#
inline future_type get_future()#

Get future for this command_queue (NOTE will be more efficient if an event is provided &#8212; otherwise a dummy kernel must be submitted to get an event)

inline future_type get_future(cl::sycl::event event)#

Get future for that becomes ready when the given event completes.

template<typename ...Params>
inline void post(queue_function_ptr_t<Params...> &&queue_member_function, Params&&... args)#

Invoke queue member function given queue and parameters &#8212; do not use event to return a hpx::future (One way)

template<typename ...Params>
inline hpx::future<void> async_execute(queue_function_ptr_t<Params...> &&queue_member_function, Params&&... args)#

Invoke queue member function given queue and parameters &#8212; hpx::future tied to the sycl event / (two way)

template<typename F, typename ...Ts>
inline decltype(auto) friend tag_invoke(hpx::parallel::execution::post_t, sycl_executor &exec, F &&f, Ts&&... ts)#
template<typename F, typename ...Ts>
inline decltype(auto) friend tag_invoke(hpx::parallel::execution::async_execute_t, sycl_executor &exec, F &&f, Ts&&... ts)#
inline cl::sycl::device get_device() const#

Return the device used by the underlying SYCL queue.

inline cl::sycl::context get_context() const#

Return the context used by the underlying SYCL queue.

Protected Attributes

cl::sycl::queue command_queue#