Skip to main content

class distr_queue

Declaration

class distr_queue { /* full declaration omitted */ };

Member Variables

std::shared_ptr<tracker> m_tracker

Member Function Overview

  • distr_queue()
  • distr_queue(const std::vector<sycl::device> & devices)
  • template <typename DeviceSelector>
    distr_queue(const DeviceSelector & device_selector)
  • template <typename T>
    fence(const experimental::host_object<T> & obj) → [[nodiscard]] std::future<T>
  • template <typename DataT, int Dims>
    fence(const buffer<DataT, Dims> & buf, const subrange<Dims> & sr) → [[nodiscard]] std::future<buffer_snapshot<DataT, Dims>>
  • template <typename DataT, int Dims>
    fence(const buffer<DataT, Dims> & buf) → [[nodiscard]] std::future<buffer_snapshot<DataT, Dims>>
  • slow_full_sync() → void
  • template <typename CGF>
    submit(allow_by_ref_t, CGF cgf) → void
  • template <typename CGF>
    submit(CGF cgf) → void
  • distr_queue(ctor_internal_tag, const detail::devices_or_selector & devices_or_selector)

Member Functions

distr_queue()


distr_queue(
    const std::vector<sycl::device>& devices)

Description

Creates a distr_queue and instructs it to use a particular set of devices.

Parameters

const std::vector<sycl::device>& devices
The devices to be used on the current node. This can vary between nodes. If there are multiple nodes running on the same host, the list of devices must be the same across nodes on the same host.

template <typename DeviceSelector>
distr_queue(const DeviceSelector& device_selector)

Description

Creates a distr_queue and instructs it to use a particular set of devices.

Template Parameters

DeviceSelector

Parameters

const DeviceSelector& device_selector
The device selector to be used on the current node. This can vary between nodes. If there are multiple nodes running on the same host, the selector must be the same across nodes on the same host.

template <typename T>
[[nodiscard]] std::future<T> fence(
    const experimental::host_object<T>& obj)

Description

Asynchronously captures the value of a host object by copy, introducing the same dependencies as a side-effect would. Waiting on the returned future in the application thread can stall scheduling of more work. To hide latency, either submit more command groups between fence and wait operations or ensure that other independent command groups are eligible to run while the fence is executed.

Template Parameters

T

Parameters

const experimental::host_object<T>& obj

template <typename DataT, int Dims>
[[nodiscard]] std::future<
    buffer_snapshot<DataT, Dims>>
fence(const buffer<DataT, Dims>& buf,
      const subrange<Dims>& sr)

Description

Asynchronously captures the contents of a buffer subrange, introducing the same dependencies as a read-accessor would. Waiting on the returned future in the application thread can stall scheduling of more work. To hide latency, either submit more command groups between fence and wait operations or ensure that other independent command groups are eligible to run while the fence is executed.

Template Parameters

DataT
int Dims

Parameters

const buffer<DataT, Dims>& buf
const subrange<Dims>& sr

template <typename DataT, int Dims>
[[nodiscard]] std::future<
    buffer_snapshot<DataT, Dims>>
fence(const buffer<DataT, Dims>& buf)

Description

Asynchronously captures the contents of an entire buffer, introducing the same dependencies as a read-accessor would. Waiting on the returned future in the application thread can stall scheduling of more work. To hide latency, either submit more command groups between fence and wait operations or ensure that other independent command groups are eligible to run while the fence is executed.

Template Parameters

DataT
int Dims

Parameters

const buffer<DataT, Dims>& buf

void slow_full_sync()

Description

Fully syncs the entire system.

This function is intended for incremental development and debugging. In production, it should only be used at very coarse granularity (second scale).


template <typename CGF>
void submit(allow_by_ref_t, CGF cgf)

Description

Submits a command group to the queue. Invoke via q.submit(celerity::allow_by_ref, [ & ](celerity::handler &cgh ) {...}).

Template Parameters

CGF

Parameters

allow_by_ref_t
CGF cgf

template <typename CGF>
void submit(CGF cgf)

Description

Submits a command group to the queue.

Template Parameters

CGF

Parameters

CGF cgf

distr_queue(ctor_internal_tag,
            const detail::devices_or_selector&
                devices_or_selector)

Parameters

ctor_internal_tag
const detail::devices_or_selector& devices_or_selector