| 185 | } |
| 186 | |
| 187 | void |
| 188 | clsparseHostTimer::Start( size_t id ) |
| 189 | { |
| 190 | #if defined( _WIN32 ) |
| 191 | ::QueryPerformanceCounter( reinterpret_cast<LARGE_INTEGER*>( &clkStart.at( id ) ) ); |
| 192 | #else |
| 193 | if( clkFrequency ) |
| 194 | { |
| 195 | struct timeval s; |
| 196 | gettimeofday( &s, 0 ); |
| 197 | clkStart.at( id ) = (cl_ulong)s.tv_sec * 1000000 + (cl_ulong)s.tv_usec; |
| 198 | } |
| 199 | else |
| 200 | { |
| 201 | |
| 202 | } |
| 203 | #endif |
| 204 | } |
| 205 | |
| 206 | void |
| 207 | clsparseHostTimer::Stop( size_t id ) |