Shortcuts

Template Struct DynamicExecParams

Inheritance Relationships

Base Type

Struct Documentation

template<typename Shared>
struct ripple::DynamicExecParams : public ripple::ExecParams<DynamicExecParams<Shared>>

Thisstruct defines the parameters of an execution space for which the size is dynamic.

The DynamicExecParams struct defines the parameters of an execution space for which the size and padding are dynamic.

It can be used when the domain size is not determined until runtime.

Template Parameters
  • Shared: A type for tile local shared memory.

  • Shared: A type for tile local shared memory.

Public Functions

constexpr DynamicExecParams() noexcept

Default constructor to create a space with default sizes.

template<typename ...Sizes, all_arithmetic_size_enable_t<3, Sizes...> = 0>
constexpr DynamicExecParams(Sizes&&... sizes) noexcept

Creates the execution space without padding.

Parameters
  • sizes: The sizes of the execution space.

Template Parameters
  • Sizes: The types of the sizes of the execution space.

template<typename ...Sizes, all_arithmetic_size_enable_t<3, Sizes...> = 0>
constexpr DynamicExecParams(uint32_t padding, Sizes&&... sizes) noexcept

Creates the eecution space without padding.

Note

The padding is the amount of padding per side of each dimension, so a padding value of 2 results in 4 additional cells in each dimension, 2 on each end of the dimension.

Parameters
  • padding: The amount of padding for each side of each dimension.

  • sizes: The sizes of each dimension of the space.

Template Parameters
  • Sizes: The types of the sizes.

template<size_t Dims>
constexpr auto size() const noexcept -> Step

Gets the total size of the execution space for the first Dims dimensions.

Note

The size here refers to the number of elements.

Return

The number of elements for Dims dimensions.

Template Parameters
  • Dims: The number of dimensions to get the size for.

template<size_t Dims>
constexpr auto size(size_t padding) const noexcept -> Step

Gets the total size of the execution space, for Dims dimensions, with a padding of padding.

Note

The size here refers to the number of elements.

Return

The total number of elements, including padding.

Parameters
  • padding: The amount of padding for each side of each dimension.

Template Parameters
  • Dims: The number of dimensions to get the size for.

template<typename Dim>
constexpr auto size(Dim &&dim) const noexcept -> size_t

Returns the size of the space in the dim dimension, without the Gets the size of the space (number of elements) in the dim dimension, without padding.

Parameters
  • dim: The dimension to get the size of.

Template Parameters
  • Dim: The type of the dimension specifier.

constexpr auto padding() const noexcept -> size_t

Gets the amount of padding for the execution space.

Note

This returns the amount of padding on a single side of a single dimension.

Return

The amount of padding for the space.

template<size_t Dims, typename T>
auto iterator(T *data) const noexcept -> BlockIterator<Value, MakeSpaceType<Dims>>

Returns an iterator over a memory space pointed to by the data, which will iterate over a space defined by this space.

Return

A block iterator over a space defined by this space.

Parameters
  • data: The data to get an iterator over.

Template Parameters
  • Dims: The number of dimension to get an iterator for.

  • T: The type of the data pointed to.

template<size_t Dims>
constexpr auto allocation_size() const noexcept -> size_t

Gets the number of bytes required to allocator data for the space.

Return

The number of bytes required to allocate sufficient space for the data.

Template Parameters
  • Dims: The number of dimensions to allocate for.

Docs

Access comprehensive developer documentation for Ripple

View Docs

Tutorials

Get tutorials to help with understand all features

View Tutorials

Examples

Find examples to help get started

View Examples