1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-16 23:07:05 +01:00

Warning elimination; drop to -O2 on G++ bad versions

This commit is contained in:
paboyle
2017-05-06 14:44:49 +01:00
parent 1d96f662e3
commit 2439999ec8
8 changed files with 20 additions and 10 deletions

View File

@ -205,13 +205,12 @@ public:
void Stop(void) {
count=0;
cycles=0;
size_t ign;
#ifdef __linux__
if ( fd!= -1) {
::ioctl(fd, PERF_EVENT_IOC_DISABLE, 0);
::ioctl(cyclefd, PERF_EVENT_IOC_DISABLE, 0);
ign=::read(fd, &count, sizeof(long long));
ign=::read(cyclefd, &cycles, sizeof(long long));
::read(fd, &count, sizeof(long long));
::read(cyclefd, &cycles, sizeof(long long));
}
elapsed = cyclecount() - begin;
#else