Packages

Fast-and-loose PRNG experiments

Current section

Files

Jump to
granderl c_src rdtsc.h
Raw

c_src/rdtsc.h

#pragma once
#include <stdint.h>
#ifdef __amd64
inline void rdtsc(uint64_t *t, uint64_t *u)
{
asm volatile ("rdtsc" : "=a" (*t), "=d" (*u));
}
#else
#error "Read your platform's perf counter here"
#endif