MCPcopy Create free account
hub / github.com/clMathLibraries/clSPARSE / Accumulator

Class Accumulator

src/benchmarks/cusparse-bench/src/statisticalTimer.cpp:38–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36// Functor object to help with accumulating values in vectors
37template< typename T >
38struct Accumulator: public std::unary_function< T, void >
39{
40 T acc;
41
42 Accumulator( ): acc( 0 ) {}
43 void operator( )(T x) { acc += x; }
44};
45
46// Unary predicate used for remove_if() algorithm

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected