38#ifndef MADNESS_WORLD_TIMERS_H__INCLUDED
39#define MADNESS_WORLD_TIMERS_H__INCLUDED
49#include <catamount/dclock.h>
53# define BG_CYCLES_PER_MICROSECOND 850
54# define BG_SECONDS_PER_CYCLE 1.176470588235294033e-09
55# include </bgsys/drivers/ppcfloor/arch/include/bpcore/ppc450_inlines.h>
59# define BG_CYCLES_PER_MICROSECOND 1600
60# define BG_SECONDS_PER_CYCLE 6.25e-10
61# include <hwi/include/bqc/A2_inlines.h>
83#if defined(HAVE_IBMBGP)
87 asm volatile (
"mftbu %0" :
"=r"(
rx) );
88 asm volatile (
"mftb %0" :
"=r"(
ry) );
89 asm volatile (
"mftbu %0" :
"=r"(
rz) );
94#elif defined(HAVE_IBMBGQ)
98 __asm__ volatile(
".byte 0x0f, 0x31" :
"=A"(x));
101 __asm__ volatile(
"rdtsc" :
"=a"(
a),
"=d"(
d));
128#if defined(X86_32) || defined(X86_64) || defined(HAVE_IBMBGP)
133#elif defined(HAVE_IBMBGP)
135#elif defined(HAVE_IBMBGQ)
138 const auto now = std::chrono::steady_clock::now();
149#if defined(X86_32) || defined(X86_64)
150 asm volatile(
"rep;nop" : : :
"memory");
151#elif defined(HAVE_IBMBGP) || defined(HAVE_IBMBGQ)
152 asm volatile (
"nop\n");
156 asm volatile (
"nop\n");
165#if defined(HAVE_CRAYXT)
171#elif defined(HAVE_IBMBGP) || defined(HAVE_IBMBGQ)
173 for (
int i=0; i<count; i++) {
174 asm volatile (
"nop\n");
Macros and tools pertaining to the configuration of MADNESS.
Namespace for all elements and tools of MADNESS.
Definition DFParameters.h:10
static double cpu_time()
Returns the cpu time in seconds relative to an arbitrary origin.
Definition timers.h:127
static void myusleep(unsigned int us)
Sleep or spin for specified number of microseconds.
Definition timers.h:164
double cpu_frequency()
Estimate the processor frequency, in Hz.
Definition timers.cc:79
double wall_time()
Returns the wall time in seconds relative to an arbitrary origin.
Definition timers.cc:48
void cpu_relax()
Do nothing and especially do not touch memory.
Definition timers.h:148
static uint64_t cycle_count()
On some machines we have access to a cycle count.
Definition timers.h:81
static XNonlinearSolver< std::vector< Function< T, NDIM > >, T, vector_function_allocator< T, NDIM > > nonlinear_vector_solver(World &world, const long nvec)
Definition nonlinsol.h:371
static const double d
Definition nonlinschro.cc:121
static const double a
Definition nonlinschro.cc:118
void e()
Definition test_sig.cc:75