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

Class Accumulator

src/clsparseTimer/clsparseTimer-device.cpp:57–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55 // Functor object to help with accumulating values in vectors
56 template< typename T >
57 struct Accumulator: public std::unary_function < T, void >
58 {
59 T acc;
60
61 Accumulator( ): acc( 0 )
62 {
63 }
64 void operator( )( T x )
65 {
66 acc += x;
67 }
68 };
69
70 // Functor object to help with accumulating values in vectors

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected