Back to index

glibc  2.9
Defines | Typedefs
hp-timing.h File Reference
#include <string.h>
#include <sys/param.h>
#include <stdio-common/_itoa.h>

Go to the source code of this file.

Defines

#define HP_TIMING_AVAIL   (0)
#define HP_SMALL_TIMING_AVAIL   (1)
#define HP_TIMING_INLINE   (1)
#define HP_TIMING_ZERO(VAR)   (VAR) = (0)
#define HP_TIMING_NOW(VAR)
#define HP_TIMING_DIFF_INIT()   do { } while (0)
#define HP_TIMING_DIFF(Diff, Start, End)   (Diff) = ((End) - (Start))
#define HP_TIMING_ACCUM(Sum, Diff)   not implemented
#define HP_TIMING_ACCUM_NT(Sum, Diff)   (Sum) += (Diff)
#define HP_TIMING_PRINT(Buf, Len, Val)

Typedefs

typedef unsigned int hp_timing_t

Define Documentation

#define HP_SMALL_TIMING_AVAIL   (1)

Definition at line 73 of file hp-timing.h.

#define HP_TIMING_ACCUM (   Sum,
  Diff 
)    not implemented

Definition at line 101 of file hp-timing.h.

#define HP_TIMING_ACCUM_NT (   Sum,
  Diff 
)    (Sum) += (Diff)

Definition at line 104 of file hp-timing.h.

#define HP_TIMING_AVAIL   (0)

Definition at line 72 of file hp-timing.h.

#define HP_TIMING_DIFF (   Diff,
  Start,
  End 
)    (Diff) = ((End) - (Start))

Definition at line 98 of file hp-timing.h.

#define HP_TIMING_DIFF_INIT ( )    do { } while (0)

Definition at line 95 of file hp-timing.h.

#define HP_TIMING_INLINE   (1)

Definition at line 76 of file hp-timing.h.

#define HP_TIMING_NOW (   VAR)
Value:
do {                                                                 \
    unsigned long int x_;                                            \
    asm volatile ("rpcc %0" : "=r"(x_));                             \
    (VAR) = (int) (x_) - (int) (x_ >> 32);                                  \
  } while (0)

Definition at line 87 of file hp-timing.h.

#define HP_TIMING_PRINT (   Buf,
  Len,
  Val 
)
Value:
do {                                                                 \
    char __buf[20];                                                  \
    char *__cp = _itoa_word (Val, __buf + sizeof (__buf), 10, 0);           \
    int __len = (Len);                                                      \
    char *__dest = (Buf);                                            \
    while (__len-- > 0 && __cp < __buf + sizeof (__buf))                    \
      *__dest++ = *__cp++;                                           \
    memcpy (__dest, " clock cycles", MIN (__len, sizeof (" clock cycles")));  \
  } while (0)

Definition at line 107 of file hp-timing.h.

#define HP_TIMING_ZERO (   VAR)    (VAR) = (0)

Definition at line 82 of file hp-timing.h.


Typedef Documentation

typedef unsigned int hp_timing_t

Definition at line 79 of file hp-timing.h.