FleCSI User API Version: 2.3.0
 
Loading...
Searching...
No Matches
reduction_accessor< R, T > Struct Template Reference

Accessor for computing reductions. More...

Public Member Functions

auto operator[] (size_type index) const
 Prepare to update en element.
 
util::span< element_type > span () const
 Access the underlying elements.
 

Detailed Description

template<class R, typename T>
struct flecsi::data::reduction_accessor< R, T >

Accessor for computing reductions.

This class is supported for GPU execution. Name via field::reduction. Usable only with the global topology. Pass a normal field_reference. The previous field value contributes to the result.

Template Parameters
Rreduction operation
Tdata type

Member Function Documentation

◆ operator[]()

template<class R , typename T >
auto operator[] ( size_type  index) const

Prepare to update en element.

Returns
a callable that merges its T argument into the field element

◆ span()

template<class R , typename T >
util::span< element_type > span ( ) const

Access the underlying elements.