Browse Source

socl: use starpu function _starpu_clock_gettime

Nathalie Furmento 9 years ago
parent
commit
00aba29f26
2 changed files with 5 additions and 4 deletions
  1. 2 2
      socl/src/Makefile.am
  2. 3 2
      socl/src/util.c

+ 2 - 2
socl/src/Makefile.am

@@ -1,7 +1,7 @@
 # StarPU --- Runtime system for heterogeneous multicore architectures.
 # StarPU --- Runtime system for heterogeneous multicore architectures.
 #
 #
 # Copyright (C) 2009-2012, 2014-2015  Université de Bordeaux
 # Copyright (C) 2009-2012, 2014-2015  Université de Bordeaux
-# Copyright (C) 2010, 2011, 2012, 2013  CNRS
+# Copyright (C) 2010, 2011, 2012, 2013, 2015  CNRS
 #
 #
 # StarPU is free software; you can redistribute it and/or modify
 # StarPU is free software; you can redistribute it and/or modify
 # it under the terms of the GNU Lesser General Public License as published by
 # it under the terms of the GNU Lesser General Public License as published by
@@ -16,7 +16,7 @@
 
 
 AM_CFLAGS = $(GLOBAL_AM_CFLAGS) $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(HWLOC_CFLAGS)
 AM_CFLAGS = $(GLOBAL_AM_CFLAGS) $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(HWLOC_CFLAGS)
 libsocl_@STARPU_EFFECTIVE_VERSION@_la_LIBADD = $(top_builddir)/src/libstarpu-@STARPU_EFFECTIVE_VERSION@.la
 libsocl_@STARPU_EFFECTIVE_VERSION@_la_LIBADD = $(top_builddir)/src/libstarpu-@STARPU_EFFECTIVE_VERSION@.la
-AM_CPPFLAGS = -DBUILDING_SOCL -I$(top_srcdir)/include/ -I$(top_builddir)/include -I$(top_srcdir)/socl/src
+AM_CPPFLAGS = -DBUILDING_SOCL -I$(top_srcdir)/include/ -I$(top_builddir)/include -I$(top_builddir)/src -I$(top_srcdir)/src -I$(top_srcdir)/socl/src
 AM_LDFLAGS = $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) -no-undefined
 AM_LDFLAGS = $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) -no-undefined
 
 
 SUBDIRS =
 SUBDIRS =

+ 3 - 2
socl/src/util.c

@@ -15,6 +15,8 @@
  */
  */
 
 
 #include "socl.h"
 #include "socl.h"
+#include "common/timing.h"
+
 
 
 int starpu_worker_get_range_by_id(int id) {
 int starpu_worker_get_range_by_id(int id) {
    int i, oid = 0;
    int i, oid = 0;
@@ -55,7 +57,6 @@ void ** memdup_deep_varsize_safea(const void **p, unsigned n, size_t * size) {
 
 
 cl_ulong _socl_nanotime() {
 cl_ulong _socl_nanotime() {
    struct timespec ts;
    struct timespec ts;
-   clock_gettime(CLOCK_MONOTONIC, &ts);
-
+   _starpu_clock_gettime(&ts);
    return (ts.tv_sec * 1e9 + ts.tv_nsec);
    return (ts.tv_sec * 1e9 + ts.tv_nsec);
 }
 }