26 #ifndef _STATISTICALTIMER_H_
27 #define _STATISTICALTIMER_H_
34 #if defined(__APPLE__) || defined(__MACOSX)
35 # include <OpenCL/cl.h>
61 virtual void Start(
size_t id ) = 0;
66 virtual void Stop(
size_t id ) = 0;
71 virtual void Clear( ) = 0;
77 virtual void Reset( ) = 0;
88 virtual void Reserve(
size_t nEvents,
size_t nSamples ) = 0;
96 virtual size_t getUniqueID(
const std::string& label, cl_uint groupID ) = 0;
111 virtual void Print( cl_ulong flopCount, std::string unit ) = 0;
122 #endif // _STATISTICALTIMER_H_
virtual size_t getUniqueID(const std::string &label, cl_uint groupID)=0
Provide a mapping from a 'friendly' human readable text string to an index into internal data structu...
virtual ~clsparseTimer()
Destructor for StatisticalTimer that cleans up the class.
Definition: clsparseTimer.hpp:53
defines 'C' compatible macros and inline functions to help pretty print error messages from clSPARSE ...
virtual void Reserve(size_t nEvents, size_t nSamples)=0
The implementation of the timing class may contains data structures that need to grow as more samples...
virtual void Print(cl_ulong flopCount, std::string unit)=0
Print the output of the timing information to the console. This includes information specific to the ...
virtual void Clear()=0
Clear all internal data structures, deallocate all memory.
virtual size_t pruneOutliers(cl_double multiple)=0
Using the stdDev of the entire population (of an id), eliminate those samples that fall outside some ...
Counter that provides a fairly accurate timing mechanism for both windows and linux. This timer is used extensively in all the samples.
Definition: clsparseTimer.hpp:46
virtual void Reset()=0
Clear all internal data structures, freeing all memory, then reallocate the same amount of memory req...
virtual void setNormalize(bool norm)=0
Request that the timer divides total samples collected by sample frequency, converting tick counts in...
virtual void Stop(size_t id)=0
Stop a timing sample.
virtual void Start(size_t id)=0
Start a timing sample.