18 #ifndef __STARPU_PROFILING_H__ 
   19 #define __STARPU_PROFILING_H__ 
   31 #define STARPU_PROFILING_DISABLE        0 
   32 #define STARPU_PROFILING_ENABLE         1 
   89 #ifdef BUILDING_STARPU 
   90 #include <common/utils.h> 
   92 extern int _starpu_profiling;
 
   93 #define starpu_profiling_status_get() ({ \ 
   95         ANNOTATE_HAPPENS_AFTER(&_starpu_profiling); \ 
   96         __ret = _starpu_profiling; \ 
   97         ANNOTATE_HAPPENS_BEFORE(&_starpu_profiling); \ 
  114 static __starpu_inline 
void starpu_timespec_clear(
struct timespec *tsp)
 
  121 static __starpu_inline 
void starpu_timespec_add(
struct timespec *a,
 
  123                                                 struct timespec *result)
 
  125         result->tv_sec = a->tv_sec + b->tv_sec;
 
  126         result->tv_nsec = a->tv_nsec + b->tv_nsec;
 
  128         if (result->tv_nsec >= 1000000000)
 
  131                 result->tv_nsec -= 1000000000;
 
  136 static __starpu_inline 
void starpu_timespec_accumulate(
struct timespec *result,
 
  139         result->tv_sec += a->tv_sec;
 
  140         result->tv_nsec += a->tv_nsec;
 
  142         if (result->tv_nsec >= 1000000000)
 
  145                 result->tv_nsec -= 1000000000;
 
  150 static __starpu_inline 
void starpu_timespec_sub(
const struct timespec *a,
 
  151                                                 const struct timespec *b,
 
  152                                                 struct timespec *result)
 
  154         result->tv_sec = a->tv_sec - b->tv_sec;
 
  155         result->tv_nsec = a->tv_nsec - b->tv_nsec;
 
  157         if ((result)->tv_nsec < 0)
 
  160                 result->tv_nsec += 1000000000;
 
  164 #define starpu_timespec_cmp(a, b, CMP)                          \ 
  165         (((a)->tv_sec == (b)->tv_sec) ? ((a)->tv_nsec CMP (b)->tv_nsec) : ((a)->tv_sec CMP (b)->tv_sec))