vSMC
vSMC: Scalable Monte Carlo
Classes | Functions
RDTSC

CPU clock cycles count using RDTSC and RDTSCP. More...

Classes

class  vsmc::RDTSCCounter
 CPU clock cycle counter using rdtsc More...
 
class  vsmc::RDTSCPCounter
 CPU clock cycle counter using rdtscp More...
 

Functions

uint64_t vsmc::rdtsc ()
 Return the TSC value using RDTSC instruction. More...
 
uint64_t vsmc::rdtscp (unsigned *aux)
 Return the TSC and TSC_AUX values using RDTSCP instruction. More...
 

Detailed Description

CPU clock cycles count using RDTSC and RDTSCP.

Function Documentation

uint64_t vsmc::rdtsc ( )
inline

Return the TSC value using RDTSC instruction.

Note
This function does not sync by itself. Call cpuid to sync if more accurate measurement is needed.

Definition at line 48 of file rdtsc.hpp.

uint64_t vsmc::rdtscp ( unsigned *  aux)
inline

Return the TSC and TSC_AUX values using RDTSCP instruction.

Definition at line 67 of file rdtsc.hpp.