Commit 9f283b4d authored by Mark Abraham's avatar Mark Abraham Committed by Paul Bauer
Browse files

Remove GMX_CYCLECOUNTERS

With ARMv7 support removed, cycle counters are available on all
known platforms, so the CMake option to disable them can be removed.
This change will be easy to revert if the need arises in future.

Includes partial revert of 0d4ea603, which was added
when supporting quirks of ARMv7.

Refs #2990

Change-Id: Iac107d977fcd8ea67d8306149b9fb6c17985afa4
parent d5e465a3
......@@ -690,9 +690,6 @@ endif()
include(gmxManageSimd)
gmx_manage_simd()
set(GMX_CYCLECOUNTERS ON CACHE BOOL "Use CPU cycle counters timing")
mark_as_advanced(GMX_CYCLECOUNTERS)
# Process QM/MM Settings
if(${GMX_QMMM_PROGRAM} STREQUAL "GAUSSIAN")
set(GMX_QMMM_GAUSSIAN 1)
......
......@@ -192,9 +192,6 @@
/* Use ORCA for QM-MM calculations */
#cmakedefine01 GMX_QMMM_ORCA
/* Use cycle counters */
#cmakedefine01 GMX_CYCLECOUNTERS
/* Use sub-counters */
#cmakedefine01 GMX_CYCLE_SUBCOUNTERS
......
......@@ -71,17 +71,17 @@ typedef unsigned long long gmx_cycles_t;
#elif defined(_MSC_VER)
# include <windows.h>
typedef __int64 gmx_cycles_t;
typedef __int64 gmx_cycles_t;
#elif (defined(__hpux) || defined(__HP_cc)) && defined(__ia64)
/* HP compiler on ia64 */
# include <machine/sys/inline.h>
typedef unsigned long gmx_cycles_t;
typedef unsigned long gmx_cycles_t;
#elif (defined(__INTEL_COMPILER) || defined(__ECC)) && defined(__ia64__)
/* Intel compiler on ia64 */
# include <ia64intrin.h>
typedef unsigned long gmx_cycles_t;
typedef unsigned long gmx_cycles_t;
#elif defined(__GNUC__) && defined(__ia64__)
/* ia64 with GCC inline assembly */
......@@ -94,11 +94,11 @@ typedef unsigned long gmx_cycles_t;
#elif ((defined(__hppa__) || defined(__hppa)) && defined(__hpux))
/* HP PA-RISC, instruction when using HP compiler */
# include <machine/inline.h>
typedef unsigned long gmx_cycles_t;
typedef unsigned long gmx_cycles_t;
#elif defined(__GNUC__) && defined(__s390__)
/* S390, taken from FFTW who got it from James Treacy */
typedef unsigned long long gmx_cycles_t;
typedef unsigned long long gmx_cycles_t;
#elif defined(__GNUC__) && defined(__alpha__)
/* gcc inline assembly on alpha CPUs */
......@@ -111,7 +111,7 @@ typedef unsigned long gmx_cycles_t;
#elif defined(__DECC) && defined(__alpha)
/* Digital GEM C compiler on alpha */
# include <c_asm.h>
typedef unsigned long gmx_cycles_t;
typedef unsigned long gmx_cycles_t;
#elif (defined(__sgi) && defined(CLOCK_SGI_CYCLE))
/* Irix compilers on SGI hardware. Get nanoseconds from struct timespec */
......@@ -119,7 +119,7 @@ typedef unsigned long long gmx_cycles_t;
#elif (defined(__SVR4) && defined(__SUNPRO_CC))
/* Solaris high-resolution timers */
typedef hrtime_t gmx_cycles_t;
typedef hrtime_t gmx_cycles_t;
#elif defined(__xlC__) && defined(_AIX)
/* AIX compilers */
......@@ -130,7 +130,7 @@ typedef unsigned long long gmx_cycles_t;
#elif ((defined(__GNUC__) || defined(__IBM_GCC_ASM) || defined(__IBM_STDCPP_ASM)) \
&& (defined(__powerpc__) || defined(__ppc__)))
/* PowerPC using gcc inline assembly (also works on xlc>=7.0 with -qasm=gcc) */
typedef unsigned long long gmx_cycles_t;
typedef unsigned long long gmx_cycles_t;
#elif (defined(__MWERKS__) && (defined(MAC) || defined(macintosh)))
/* Metrowerks on macintosh */
......@@ -138,7 +138,7 @@ typedef unsigned long long gmx_cycles_t;
#elif defined(__sun) && defined(__sparcv9)
typedef unsigned long gmx_cycles_t;
typedef unsigned long gmx_cycles_t;
#else
/*! \brief Integer-like datatype for cycle counter values
......@@ -173,13 +173,8 @@ typedef long gmx_cycles_t;
* the difference between two gmx_cycles_t values returned from this
* routine.
*/
#if (GMX_CYCLECOUNTERS == 0)
static __inline__ gmx_cycles_t gmx_cycles_read(void)
{
return 0;
}
#elif ((defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__PATHSCALE__) || defined(__PGIC__)) \
&& (defined(__i386__) || defined(__x86_64__)) && !defined(_CRAYC))
#if ((defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__PATHSCALE__) || defined(__PGIC__)) \
&& (defined(__i386__) || defined(__x86_64__)) && !defined(_CRAYC))
static __inline__ gmx_cycles_t gmx_cycles_read()
{
/* x86 with GCC inline assembly - pentium TSC register */
......@@ -407,14 +402,9 @@ static gmx_cycles_t gmx_cycles_read(void)
* one when later linking to the library it might happen that the
* library supports cyclecounters but not the headers, or vice versa.
*/
#if (GMX_CYCLECOUNTERS == 0)
static __inline__ bool gmx_cycles_have_counter(void)
{
return 0;
}
#elif ((defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__PATHSCALE__) \
|| defined(__PGIC__) || defined(_CRAYC)) \
&& (defined(__i386__) || defined(__x86_64__)))
#if ((defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__PATHSCALE__) \
|| defined(__PGIC__) || defined(_CRAYC)) \
&& (defined(__i386__) || defined(__x86_64__)))
static __inline__ bool gmx_cycles_have_counter()
{
/* x86 or x86-64 with GCC inline assembly - pentium TSC register */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment