annotate TaskManager/Fifo/rdtsc.h @ 1553:21ddbc06dcde draft

fix GpuScheduler
author Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
date Sun, 17 Feb 2013 19:42:36 +0900
parents 411401d1cb71
children 7673e2ad2623
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1301
2fa31362ead0 add header to be used Read Time Stamp Counter
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 #ifndef RDTSC_H_
2fa31362ead0 add header to be used Read Time Stamp Counter
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 #define RDTSC_H_
2fa31362ead0 add header to be used Read Time Stamp Counter
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3
2fa31362ead0 add header to be used Read Time Stamp Counter
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 /*
2fa31362ead0 add header to be used Read Time Stamp Counter
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 * rdtsc is Read Time Stamp Counter
2fa31362ead0 add header to be used Read Time Stamp Counter
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 */
2fa31362ead0 add header to be used Read Time Stamp Counter
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7
2fa31362ead0 add header to be used Read Time Stamp Counter
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 inline unsigned long long rdtsc() {
1517
411401d1cb71 remove minor warning.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1345
diff changeset
9 unsigned long long ret = 0;
411401d1cb71 remove minor warning.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1345
diff changeset
10 #ifdef __CERIUM_FIFO__ // ??
1301
2fa31362ead0 add header to be used Read Time Stamp Counter
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 __asm__ volatile ("rdtsc" : "=A" (ret));
1345
95de5f81924d exclusion of asm from Cell
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 1301
diff changeset
12 #endif // __CERIUM_FIFO__
1301
2fa31362ead0 add header to be used Read Time Stamp Counter
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 return ret;
2fa31362ead0 add header to be used Read Time Stamp Counter
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 }
2fa31362ead0 add header to be used Read Time Stamp Counter
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15
2fa31362ead0 add header to be used Read Time Stamp Counter
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 #endif /* RDTSC_H_ */