1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-04-10 22:20:45 +01:00

Namespace, format

This commit is contained in:
paboyle 2018-01-12 23:55:38 +00:00
parent 7e70f4ed9c
commit c01a1e02fe
4 changed files with 109 additions and 107 deletions

View File

@ -1,4 +1,4 @@
/*************************************************************************************
/*************************************************************************************
Grid physics library, www.github.com/paboyle/Grid
@ -25,8 +25,8 @@ Author: paboyle <paboyle@ph.ed.ac.uk>
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
See the full license in the file "LICENSE" in the top level distribution directory
*************************************************************************************/
/* END LEGAL */
*************************************************************************************/
/* END LEGAL */
#ifndef GRID_PERFCOUNT_H
#define GRID_PERFCOUNT_H
@ -47,7 +47,7 @@ Author: paboyle <paboyle@ph.ed.ac.uk>
#include <x86intrin.h>
#endif
namespace Grid {
NAMESPACE_BEGIN(Grid);
#ifdef __linux__
static long perf_event_open(struct perf_event_attr *hw_event, pid_t pid,
@ -241,5 +241,6 @@ public:
};
}
NAMESPACE_END(Grid);
#endif

View File

@ -2,7 +2,7 @@
#include <Grid/perfmon/PerfCount.h>
#include <Grid/perfmon/Stat.h>
namespace Grid {
NAMESPACE_BEGIN(Grid);
bool PmuStat::pmu_initialized=false;
@ -175,7 +175,7 @@ void PmuStat::KNLevsetup(const char *ename, int &fd, int event, int umask)
}
void PmuStat::KNLsetup(void){
void PmuStat::KNLsetup(void){
int ret;
char fname[1024];
@ -207,7 +207,7 @@ void PmuStat::KNLevsetup(const char *ename, int &fd, int event, int umask)
KNLevsetup(fname, gbl.edc_misse[edc], 0x2, 0x4);
KNLevsetup(fname, gbl.edc_missm[edc], 0x2, 0x8);
}
}
}
uint64_t PmuStat::KNLreadctr(int fd)
{
@ -242,4 +242,5 @@ void PmuStat::KNLreadctrs(ctrs &c)
}
#endif
}
NAMESPACE_END(Grid);

View File

@ -5,7 +5,7 @@
#define _KNIGHTS_LANDING_ROOTONLY
#endif
namespace Grid {
NAMESPACE_BEGIN(Grid);
///////////////////////////////////////////////////////////////////////////////
// Extra KNL counters from MCDRAM
@ -96,9 +96,10 @@ public:
static void KNLevsetup(const char *ename, int &fd, int event, int umask);
#endif
};
};
NAMESPACE_END(Grid);
}
#endif

View File

@ -1,4 +1,4 @@
/*************************************************************************************
/*************************************************************************************
Grid physics library, www.github.com/paboyle/Grid
@ -24,8 +24,8 @@ Author: Peter Boyle <paboyle@ph.ed.ac.uk>
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
See the full license in the file "LICENSE" in the top level distribution directory
*************************************************************************************/
/* END LEGAL */
*************************************************************************************/
/* END LEGAL */
#ifndef GRID_TIME_H
#define GRID_TIME_H
@ -33,11 +33,9 @@ Author: Peter Boyle <paboyle@ph.ed.ac.uk>
#include <ctime>
#include <chrono>
namespace Grid {
// Dress the output; use std::chrono
NAMESPACE_BEGIN(Grid)
// Dress the output; use std::chrono
// C++11 time facilities better?
inline double usecond(void) {
struct timeval tv;
@ -98,5 +96,6 @@ public:
}
};
}
NAMESPACE_END(Grid)
#endif