blob: 5f388722207fbf5a7b606113cf0d359febd7da4b [file] [log] [blame]
tanjent@gmail.comf67ce942011-03-14 09:11:18 +00001#include "Platform.h"
2
tanjent@gmail.com2aa29c32011-03-19 08:53:53 +00003#include <stdio.h>
tanjent@gmail.comf67ce942011-03-14 09:11:18 +00004
tanjent@gmail.com2aa29c32011-03-19 08:53:53 +00005void testRDTSC ( void )
tanjent@gmail.comf67ce942011-03-14 09:11:18 +00006{
tanjent@gmail.com2aa29c32011-03-19 08:53:53 +00007 int64_t temp = rdtsc();
8
9 printf("%d",(int)temp);
tanjent@gmail.comf67ce942011-03-14 09:11:18 +000010}
11
tanjent@gmail.com2aa29c32011-03-19 08:53:53 +000012#if defined(_MSC_VER)
tanjent@gmail.comf67ce942011-03-14 09:11:18 +000013
14#include <windows.h>
15
16void SetAffinity ( int cpu )
17{
18 SetProcessAffinityMask(GetCurrentProcess(),cpu);
19}
20
tanjent@gmail.com2aa29c32011-03-19 08:53:53 +000021#else
22
23void SetAffinity ( int /*cpu*/ )
24{
25}
26
27#endif