b52873ff98
Port perfDispatch tests from OpenCL into hip direct_tests Change-Id: I9f8362636e329d2d0a434c4f012ccc46a524c746
29 lines
380 B
C++
29 lines
380 B
C++
#ifndef _TIMER_H_
|
|
#define _TIMER_H_
|
|
|
|
#ifdef _WIN32
|
|
typedef __int64 i64 ;
|
|
#endif
|
|
#ifdef __linux__
|
|
typedef long long i64;
|
|
#endif
|
|
|
|
class CPerfCounter {
|
|
|
|
public:
|
|
CPerfCounter();
|
|
~CPerfCounter();
|
|
void Start(void);
|
|
void Stop(void);
|
|
void Reset(void);
|
|
double GetElapsedTime(void);
|
|
|
|
private:
|
|
|
|
i64 _freq;
|
|
i64 _clocks;
|
|
i64 _start;
|
|
};
|
|
|
|
#endif // _TIMER_H_
|