struct
SushiRuntime::Extent
template <int N>Describes the iteration shape of a fluent kernel: an N-D box with an origin.
- Declared in
include/SushiRuntime/api/launch/extent.hpp
Template parameters
NNumber of dimensions (1, 2, or 3), matching SYCL's range rank.
See also
include/SushiRuntime/api/launch/README.md
Public attributes
sycl::range< N > extentWork-items per dimension.
sycl::id< N > offset = sycl::id<N>{}Origin of the iterated box.
Public member functions
template <int M = N, std::enable_if_t< M==1, int > = 0>
Extent(std::size_t n)A 1-D extent from a plain element count (offset 0).
Parameters
nNumber of work-items to iterate.
template <class... Sizes, std::enable_if_t< N > = 2 && sizeof...(Sizes) == N && (std::is_convertible_v<Sizes, std::size_t> && ...), int>
Extent(Sizes... sizes)An extent from explicit per-dimension sizes (offset 0).
Parameters
sizesExactly N work-item counts, one per dimension, in SYCL order (slowest-varying first).
explicit Extent(sycl::range< N > r)An extent from a SYCL range, offset 0.
Parameters
rWork-items per dimension.
Extent(sycl::range< N > r, sycl::id< N > o)An extent from a SYCL range and an explicit origin.
Parameters
rWork-items per dimension.
oIndex of the first work-item, so the kernel iterates a sub-box.
std::size_t count() const noexceptReports how much work this shape represents.
Returns
Total work-items, the product of the per-dimension sizes.
Extent at(sycl::id< N > origin) const noexceptRebases the same box at a different origin.
Parameters
originIndex of the first work-item in the returned extent.
Returns
A copy with this extent's sizes and the given origin.

