Shortcuts

Struct SumReducer

Struct Documentation

struct ripple::SumReducer

Functor which can be used with the reduction to perform a reduction sum.

#collectives-cg-reduce

Note

There is supposedly hardware support for certain predicates, see:

In the CUDA programming guide, however, it’s been tested on sm_80 and sm_86 and there is very little difference in performance compared to the implementations below, which work with both the host and device reduction versions, so these are preferred. Perhaps there is more difference in performance for different use cases than those which were tested.

Public Functions

template<typename T>
auto inplace(T &a, const T &b) const noexcept -> void

Adds the data pointed to by the one iterator to the other.

Parameters
  • a: An iterator to the data to add to.

  • b: An iterator to the data to add.

Template Parameters
  • T: The type of the iterator.

template<typename T>
auto operator()(const T &a, const T &b) const noexcept -> T

Adds the data a and b and returns the result.

Return

The addition of the two elements.

Parameters
  • a: The first data to add.

  • b: The second data to add.

Template Parameters
  • T: The type of the data.

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