Contents

namespace

SushiRuntime::API

Declared in
include/SushiRuntime/api/data/buffer.hpp

Contains

Enumerations

enum class Residency

Names where a Buffer or State keeps its memory across steps.

See also

include/SushiRuntime/api/data/README.md

Shared

Host-addressable USM; the default.

Device

Device-resident USM; host access only via read/write_range.

Host

Pinned host USM; host-readable while kernels run.

Typedefs

using SushiRuntime::API::DeviceIndex = Core::StrongId<struct DeviceIndexTag>

Which device queue an allocation is pinned to.

A strong typedef so a device selector cannot be confused with an element count or an offset at a call site — buffer(count, DeviceIndex{1}) reads unambiguously and a swapped argument is a compile error, not a silent allocation on the wrong device.

using SushiRuntime::API::BackingGraph = ::SushiRuntime::Graph::TaskGraph

Names the lower-level graph builder this layer wraps.

using SushiRuntime::API::RuntimeConfig = Execution::RuntimeSettings

Names the runtime-wide settings chosen once at Runtime::create().

See also

include/SushiRuntime/api/runtime/README.md

using SushiRuntime::API::PinPolicy = Execution::PinPolicy

Whether workers bind to cores; see Execution::PinPolicy.

Variables

template <class F>
constexpr bool is_graph_emitter_v = std::is_invocable_v<F, BackingGraph&>

A graph emitter that records nodes on a backing graph: void(BackingGraph&).

Functions

const char * residency_name(Residency residency) noexcept

Names a residency as its enumerator spelling, for messages.

Parameters

residency

The residency to name.

Returns

"Shared", "Device", "Host", or "unknown" for an out-of-range value.

template <class... Sizes>
Extent(Sizes...) -> Extent< static_cast< int >(sizeof...(Sizes))>
template <int N>
Extent(sycl::range< N >) -> Extent< N >
template <int N>
Extent(sycl::range< N >, sycl::id< N >) -> Extent< N >
template <int N>
NdRange(sycl::range< N >, sycl::range< N >) -> NdRange< N >
template <typename T>
In(const Buffer< T > &) -> In< T >
template <typename T>
Out(Buffer< T > &) -> Out< T >
template <typename T>
InOut(Buffer< T > &) -> InOut< T >
Dynamic when(Dynamic::WhenProvider pred)

Builds a Dynamic that enables its node only while pred is true.

Parameters

pred

Polled before each step; false skips the node that step.

Returns

A Dynamic carrying the predicate, ready to pass to add().

Dynamic sized(Dynamic::CountProvider count)

Builds a Dynamic that sets its node's live iteration size per step.

Parameters

count

Polled before each step; must not exceed the baked capacity.

Returns

A Dynamic carrying the size provider, ready to pass to add().

Dynamic sized_from_device(const Buffer< std::uint32_t > &counter, std::size_t index=0)

Builds a Dynamic whose size comes from a count the device produced.

Parameters

counter

Residency::Host buffer a predecessor writes the count into.

Exceptions

Core::SushiException

If counter is not Residency::Host or index is out of range.

See also

include/SushiRuntime/api/vocabulary/README.md

Dynamic based_at(Dynamic::BaseProvider base)

Builds a Dynamic whose node starts at a per-step element offset.

Parameters

base

Polled before each step; the first element to iterate.

See also

include/SushiRuntime/api/vocabulary/README.md

Dynamic based_at_device(const Buffer< std::uint32_t > &slot, std::size_t index=0)

Builds a Dynamic whose base comes from a slot the device wrote.

Parameters

slot

Residency::Host buffer a predecessor writes the base into.

Exceptions

Core::SushiException

If slot is not Residency::Host or index is out of range.

See also

include/SushiRuntime/api/vocabulary/README.md