summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-03-04 00:27:06 -0500
committerTavian Barnes <tavianator@gmail.com>2010-03-04 00:27:06 -0500
commit9637b42233c56f0811c7ebb0fe4e96124922a831 (patch)
tree0c52d4d130f6789cdb76302561a26c486b5a0a53
parente3805176cd1e77ccb32410cbd0a4e454dd34b509 (diff)
downloaddimension-9637b42233c56f0811c7ebb0fe4e96124922a831.tar.xz
Use libsandglass 0.2 API.
-rw-r--r--bench/libdimension/Makefile.am4
-rw-r--r--bench/libdimension/array.c3
-rw-r--r--bench/libdimension/bvst.c3
-rw-r--r--bench/libdimension/geometry.c3
-rw-r--r--configure.ac6
5 files changed, 8 insertions, 11 deletions
diff --git a/bench/libdimension/Makefile.am b/bench/libdimension/Makefile.am
index 4937e5d..9446f5e 100644
--- a/bench/libdimension/Makefile.am
+++ b/bench/libdimension/Makefile.am
@@ -21,8 +21,8 @@ INCLUDES = -I$(top_srcdir)/libdimension
EXTRA_PROGRAMS = bench-array bench-geometry bench-bvst
-AM_CFLAGS = $(SANDGLASS_CFLAGS)
-AM_LDFLAGS = $(SANDGLASS_LIBS) $(top_builddir)/libdimension/libdimension.la
+AM_CFLAGS = $(libsandglass_CFLAGS)
+AM_LDFLAGS = $(libsandglass_LIBS) $(top_builddir)/libdimension/libdimension.la
bench_array_SOURCES = array.c
bench_geometry_SOURCES = geometry.c
diff --git a/bench/libdimension/array.c b/bench/libdimension/array.c
index 972fff6..dae7c98 100644
--- a/bench/libdimension/array.c
+++ b/bench/libdimension/array.c
@@ -33,9 +33,8 @@ main()
const unsigned int count = 32;
sandglass_t sandglass;
- sandglass_attributes_t attr = { SANDGLASS_MONOTONIC, SANDGLASS_CPUTIME };
- if (sandglass_create(&sandglass, &attr, &attr) != 0) {
+ if (sandglass_init_monotonic(&sandglass, SANDGLASS_CPUTIME) != 0) {
perror("sandglass_create()");
return EXIT_FAILURE;
}
diff --git a/bench/libdimension/bvst.c b/bench/libdimension/bvst.c
index a33a8ba..f08989f 100644
--- a/bench/libdimension/bvst.c
+++ b/bench/libdimension/bvst.c
@@ -112,9 +112,8 @@ main()
long grains;
sandglass_t sandglass;
- sandglass_attributes_t attr = { SANDGLASS_MONOTONIC, SANDGLASS_CPUTIME };
- if (sandglass_create(&sandglass, &attr, &attr) != 0) {
+ if (sandglass_init_monotonic(&sandglass, SANDGLASS_CPUTIME) != 0) {
perror("sandglass_create()");
return EXIT_FAILURE;
}
diff --git a/bench/libdimension/geometry.c b/bench/libdimension/geometry.c
index a2523b7..282d3eb 100644
--- a/bench/libdimension/geometry.c
+++ b/bench/libdimension/geometry.c
@@ -30,9 +30,8 @@ main()
double result;
sandglass_t sandglass;
- sandglass_attributes_t attr = { SANDGLASS_MONOTONIC, SANDGLASS_CPUTIME };
- if (sandglass_create(&sandglass, &attr, &attr) != 0) {
+ if (sandglass_init_monotonic(&sandglass, SANDGLASS_CPUTIME) != 0) {
perror("sandglass_create()");
return EXIT_FAILURE;
}
diff --git a/configure.ac b/configure.ac
index ea454e3..089470d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,11 +40,11 @@ AC_ARG_ENABLE([pgo],
AM_CONDITIONAL([PGO], [test "$enable_pgo" != "no"])
dnl Timing library for benchmarks
-PKG_CHECK_MODULES([SANDGLASS], [libsandglass],
+PKG_CHECK_MODULES([libsandglass], [libsandglass >= 0.2],
[],
[AC_MSG_WARN([libsandglass not found - benchmarking suite will not work])])
-AC_SUBST(SANDGLASS_CFLAGS)
-AC_SUBST(SANDGLASS_LIBS)
+AC_SUBST(libsandglass_CFLAGS)
+AC_SUBST(libsandglass_LIBS)
dnl Ensure compilation in C99 mode
AC_DEFINE([_XOPEN_SOURCE], [600])