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

Class Accumulator

src/clsparseTimer/clsparseTimer-host.cpp:66–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64 // Functor object to help with accumulating values in vectors
65 template< typename T >
66 struct Accumulator: public std::unary_function < T, void >
67 {
68 T acc;
69
70 Accumulator( ): acc( 0 ) {}
71 void operator( )( T x ) { acc += x; }
72 };
73
74 // Unary predicate used for remove_if() algorithm

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected