|
Template Numerical Library version\ main:4e6e2c1
|
Public Types | |
| using | ConstViewType = CSRScalarKernel< Index, Device > |
| using | DeviceType = Device |
| using | IndexType = Index |
| using | ViewType = CSRScalarKernel< Index, Device > |
Public Member Functions | |
| __cuda_callable__ ConstViewType | getConstView () const |
| __cuda_callable__ ViewType | getView () |
| template<typename Segments> | |
| void | init (const Segments &segments) |
| void | reset () |
Static Public Member Functions | |
| static std::string | getKernelType () |
| template<typename SegmentsView, typename Fetch, typename Reduction, typename ResultKeeper, typename Value = typename Segments::detail::FetchLambdaAdapter< Index, Fetch >::ReturnType> | |
| static void | reduceAllSegments (const SegmentsView &segments, Fetch &fetch, const Reduction &reduction, ResultKeeper &keeper, const Value &identity=Reduction::template getIdentity< Value >()) |
| Call reduceSegments for all segments. | |
| template<typename SegmentsView, typename Fetch, typename Reduction, typename ResultKeeper, typename Value = typename Segments::detail::FetchLambdaAdapter< Index, Fetch >::ReturnType> | |
| static void | reduceSegments (const SegmentsView &segments, Index begin, Index end, Fetch &fetch, const Reduction &reduction, ResultKeeper &keeper, const Value &identity=Reduction::template getIdentity< Value >()) |
| Compute reduction in each segment. | |
|
static |
Call reduceSegments for all segments.
See reduceSegments for more details.
|
static |
Compute reduction in each segment.
| Fetch | is type of lambda function for data fetching. |
| Reduction | is a reduction operation. |
| ResultKeeper | is lambda function for storing results from particular segments. |
| segments | is the segments data structure to be reduced. |
| begin | defines beginning of an interval [ begin, end ) of segments in which we want to perform the reduction. |
| end | defines and of an interval [ begin, end ) of segments in which we want to perform the reduction. |
| fetch | is a lambda function for fetching of data. It is suppos have one of the following forms:
|
| reduction | is a lambda function representing the reduction operation. It is supposed to be defined as: |
where a and b are values to be reduced and the lambda function returns result of the reduction.
| keeper | is a lambda function for saving results from particular segments. It is supposed to be defined as: |
where segmentIdx is an index of the segment and value is the result of the reduction in given segment to be stored.
| identity | is the initial value for the reduction operation. If Reduction does not have a static member function template getIdentity, it must be supplied explicitly by the user. |