Contents

struct

SushiRuntime::NdRange

template <int N>

Describes an nd_range launch: a global iteration box tiled by a local size.

Declared in
include/SushiRuntime/api/launch/nd_range.hpp

Template parameters

N

Number of dimensions (1, 2, or 3).

Precondition

Each global dimension is a whole multiple of the matching local dimension.

See also

include/SushiRuntime/api/launch/README.md

Public attributes

sycl::range< N > global

Total work-items per dimension.

sycl::range< N > local

Work-group size per dimension.

Public member functions

NdRange(sycl::range< N > g, sycl::range< N > l)

Builds the launch from global and local ranges.

Parameters

g

Total work-items per dimension.

l

Work-group size per dimension; each g dimension must be a whole multiple of the matching l dimension.

sycl::nd_range< N > to_nd_range() const noexcept

Converts to the SYCL type a parallel_for takes.

Returns

An nd_range carrying this launch's global and local ranges.

std::size_t count() const noexcept

Reports how much work this launch represents.

Returns

Total work-items, the product of the global sizes.